简体   繁体   中英

MonoLauncher instance suspended after stopping my Visual Studio Debug

I have been having issues with my Visual Studio 2015 for quite a while now. I am working in C# and MonoGame. For my game I am running 3 separate instances of a MonoGame launcher. However when I stop debugging my game in visual studio it is often the case that at least one of my MonoGame instances hangs around suspended in the background. This then doesnt let me start debugging my game until I go into task manager and manually kill the process running. This has been slowing down my development process for some time now.

当我尝试开始调试时拍摄的图像,而进程在后台运行。

暂停 MonoLauncher 实例。

I was hoping to get some information on why this may be happening, and hopefully find a fix for this. Any help would be appreciated. Cheers.

Try Running Visual Studio as Administrator. Still this is possible when you stop the debugging at the middle of some functionality.

If you don't want to kill it manually. One possible option/hack is running a batch file on program closing.

if (Debugger.IsAttached)
{
     System.Diagnostics.Process.Start(@"C:\KillMonoLauncher.bat");
}

In KillMonoLauncher.bat file

taskkill /f /im MonoLauncher.exe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM