Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2008: Unable to start debugging, Remote Debugging Monitor has been closed

I am getting a mysterious error from time to time that I just don't get. I can "fix" it by restarting Visual Studio 2008, but that isn't exactly a solution...

It states the following:

Error while trying to run project: Unable to start debugging.

The Microsoft Visual Studio Remote Debugging Monitor has been closed on the remote machine.

I am not doing anything remote, as far as I know... Just running regular debug, F5 style. What does it mean? How can I fix it?

Error dialog

like image 947
Svish Avatar asked Jan 13 '10 17:01

Svish


People also ask

How do I fix unable to start debugging on web server?

Restart your Application Pool. Check that your Web Application folder has the right permissions. Make sure that you give IIS_IUSRS, IUSR, or the specific user associated with the Application Pool read and execute rights for the Web Application folder. Fix the issue and restart your Application Pool.

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.

How do I enable debugging in web config?

In the Web. config file, locate the compilation element. Debugging is enabled when the debug attribute in the compilation element is set to true. Change the debug attribute to false to disable debugging for that application.


1 Answers

If you are on a 64bit OS then you are 'silently' remote debugging. Devenv runs in WoW64 (meaning it's a 32bit process) ... when you hit F5 is launchs msvsmon.exe as a 64 bit process and sets up a communication channel between devenv and msvsmon "silent remote debugging" to allow debugging your 64 bit process.

Check task manager when you are successfully debugging and you should see msvsmon.exe running.

If the above assumption (64bit OS) is correct, the error you are seeing is based on Visual studio getting into a bad state. If it gives this error while an msvsmon.exe instance is running ... kill that instance. If there is no msvsmon.exe running, then restarting devenv is probably your only option.

Another possible workaround is to set your project to 'platform x86' so that you are directly debugging. The x86 compiled managed assemblies or native binaries will run in Wow64, and prevent any need for the silent remote debugging. (Obviously this doesn't help if it is a 64-bit only problem ... but in practice that is rare.)

I hope this helped or can assist you in searching out a better answer.

like image 92
Steve Steiner Avatar answered Sep 18 '22 19:09

Steve Steiner