Gary Davis' Blog

DotNET/PayPal Development and other Techie Stuff
posts - 45, comments - 146, trackbacks - 0

How I Solved the VS2010 Error: "Unable to start debugging…"

I received error message "Unable to start debugging on the web server" in Visual Studio 2010. I clicked the Help button and followed the related suggestions without success.

This happens with a newly created local ASP.Net project when modified to use IIS instead of Cassini (which works for debugging). It immediately pops up the error. Nothing shows up in the Event Viewer. This also happens with VS2008. Debugging used to work.

I am able to attach to the w3wp process to debug. It works but is not as convenient as F5.

I posted the problem at Experts-Exchange and StackOverflow. The answer came from Jeroen at StackOverflow:

  1. In Regedit, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  2. Right-click Lsa and create a new DWORD value
  3. Name it DisableLoopbackCheck
  4. Set its value to 1
  5. Reboot (instead, I killed the msvsmon.exe process and restarted Visual Studio)

My website (and IIS7.5) is on my local PC (Windows Server 2008 R2).

After finding that solution, I searched a bit on LSA and found this related KB article: http://support.microsoft.com/kb/896861 – it’s about IIS 5.1! It is something about a loopback security check that helps prevent reflection attacks.

Also reference Min Kwan Park’s blog which has lots of possible solutions for various debugger issues (though this is and old posting): http://blogs.msdn.com/b/mkpark/archive/2004/03/09/86872.aspx

 [Update]

The debug started to fail again in the same way, immediately displaying the Unable to start debugging error after the compile. Killing the msvsmon and restarting VS2010 did not help. As soon as I click F5, msvsmon.exe shows up on the taskmanager list and the error displays.

Print | posted on Friday, August 6, 2010 12:00 AM | Filed Under [ Programming ]

Feedback

Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

it could be with non asp project as well, in my case in multiproject solution the fix was -
1. right mouse button click on solution, select properties
2. in solution property pages under (left panel) Configuraiton poperties, select Configuration
3. change Platform drop down to AnyCPU, click Apply

after that i was able to compile solution. If you open again these solution properties, it could be changed to Mixed platforms, but it does not matter at this point - i can run solution
4/17/2013 12:04 PM | Sasha Bond
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

I have a similar problem; however, the "Unable to start debugging..." error occurs on some solutions, but not others. The only difference is the solutions that allow start debugging have been converted from an earlier VS2010 (I am running VS2012). My setup includes the configuration of "AnyCPU" for both solutions. I have not found any other differences on setup for either solution. I am able to attach process to invoke debugging; however, you are correct F5 is more efficient. Do you have any other suggestions? I've searched MSDN with no satisfactory results.
7/13/2013 8:48 AM | Jack Lojko
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

Windows 7 x64, VS 2012, VB.NET

I fixed it like this:-

1. Create a shortcut on your desktop to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe".

2. Right-click shortcut and select "Properties" from the dropdown menu. Select the "Compatibity" tab, tick "Run this program as administrator" and click OK

3. Create a shortcut on your desktop to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe".

4. Right-click shortcut and select "Properties" from the dropdown menu. Select the "Compatibity" tab, tick "Run this program as administrator" and click OK.

To start VS2012:-

1. Double-click the msvsmon shortcut icon (that you created above, to launch msvsmon). Wait for the "Visual Studio Remote Debugging Monitor (Administrator)" window to display before continuing ...

2. Double-click the "Visual Studio 2012 Professional" shortcut icon (that you created above, to launch VS2012)

3. In VS2012, ensure standard toolbar is visible.

4. In VS2012, ensure "Solution Platforms" dropdown (on standard toolbar) is visible and set to "x86".

and debug works (for me anyway) ...

However after 15 minutes or so, debug may stop working and you may get the msvsmon error again. If that happens, simply close VS2012 and msvsmon and then start again (from "To start VS2012:-" above) ...

12/16/2013 10:30 AM | Henry
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

Thanks! The DisableLoopbackCheck registry entry did it for me with VS 2012 and VS2013.
3/27/2014 8:34 PM | Douglas Lankshear
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

I found another method to solve the problem:
www.systemdeveloper.info/...
4/2/2014 5:43 PM | Angelo
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

Hi,i did all this and did repair the installation and restarted the machine,but no luck
it was running very good and in one second get this error, after the new update of windows,and i don't know which update did this.
i have windows 7 64 bit
VS ultimate SP1
5/29/2014 6:18 AM | Tamer
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

Sweet! This worked. Thanks a lot!
7/8/2014 1:39 PM | marco
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

Had this problem for years, fixed it! It had only affected 64bit projects to fail. My workaround so far was to ensure a working internet connection - that also avoided the problem to occur.
10/25/2015 10:35 PM | leeand
Gravatar

# computer

HamRecycling is a service providing company that assists companies with managing their commercial equipment needs
5/2/2016 10:20 AM | computer
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

dftygtfnbgthjrykmdhtgfdbfdbfdbfdbdbfd
1/12/2017 5:19 AM | asv

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 3 and 4 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET