Most of the developers who are using Visual studio have encountered the above problem. As a ASP.Net Developer I have this atleast once a day. So the below are my tricks to get ride of this issue.
1) Just Close the VS IDE.
2) Go to Task Manager and kill the worker process. (If you are working on ASP.Net application).
3) Go to the .Net installation folder ( Normally it should be C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files OR C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files) and clear the temp files from the temporary folder.
4) Open the solution and "Rebuild" entire solution. Now try to attach the debugger.
Please note that, in some machines you may have 2 framework installation, one for 32-bit and another for 64-bit. So when you go with step 3, pay close attention and make sure which .net framework was used and also which version no (either 2,3,3.5 or 4) was used by your application.
Hope this helps!
You can also add:
ReplyDeleteIf you are debugging a webservice by attaching to a process and symbols are not loading, make sure the sourcecode on the visual studio is exactly the same as the one deployed (which you are trying to debug)
Well!! Good catch! This one also applicable for normal Class Library also. Thanks for your valid point! :)
Delete