Visual Studio 2012 won't let me debug
Solution 1
I've encountered this before. Not sure what causes it, but generally it is one of a couple of things to fix it.
- make sure you are building in debug and not release
- close VS, go to the project's dir and delete the obj and bin directories. Reopen in VS and rebuild.
- there is an option under tools - options - build (iirc) that allows for checking if source is same as code file. However, you should see a message in output window if this is the case.
- on the project properties in the build (iirc) you can throttle the pdb file from full debug symbols to no pdb at all. If you are not the only person on the project check this setting still has full pdb enabled (low probability this got changed though)
- make sure you're on the right platform that you are building to (x64 vs x32)
...lots more, but a starting place...
Addendum as per comment...
So, those messages are good. It is saying there are no problems (but it sounds like you already know that :) ). I would start with the general debug options you mention. Do this on a hello world app. That way you can troubleshoot the lowest common first. Here are my settings. Try to match them and see if that works. For example, I know "ask before deleting breakpoint" is irrelevant, but "break all processes when one process breaks" is important. So, I just added them all to make it easier to troubleshoot.
ALso, make sure you are getting a red dot here like so in your code in visual studio (I've seen instances where VS won't let you put this here):
Solution 2
- Right click on the project
- Click on the properties.
- go to web.
- Check the Box for Enable Edit and Continue .
Hope that helps :)
will
Updated on July 23, 2022Comments
-
will almost 2 years
I can't seem to be able to debug. When I try to, I don't get any build errors, and the layout changes to debug mode, but the windows never pops up. I have an orange bar at the bottom of VS, which I think is standard, but nothing happens after that. It's not just in the project I'm working on. I have started a new WFA and tried to debug without adding any code and the same thing happens. Anybody have similar issues?
-
Sam about 11 yearsLikewise, deleting obj and bin is what fixes it for me.
-
will about 11 yearsOK. Here is what the output window says: The thread 'vshost.LoadReference' (0x1e58) has exited with code 0 (0x0). 'CrochetAuLait2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\Admin\documents\visual studio 2012\Projects\CrochetAuLait2\CrochetAuLait2\bin\Debug\CrochetAuLait2.exe', Symbols loaded. I tried deleting the obj and bin directories, but the same issue arose. I am in debug, and on the same x32 laptop that I wrote it on. Also, this morning I wrote a hello world console app, and it had the same problem. That's why I think it must be some universal setting in VS.
-
Hernaldo Gonzalez almost 10 yearsMaster! Delete bin and obj folders works for me! Thanks
-
Wai Ha Lee over 8 yearsCan you elaborate on your answer?