will
will

Reputation: 897

Visual Studio 2012 won't let me debug

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?

Upvotes: 9

Views: 44942

Answers (12)

Kaushik
Kaushik

Reputation: 1

Install Microsoft SSDTSetup.exe 450Kb and Close the SSDT tool during install. After installation open the SSDT tool and execute the script task and Component with breakpoint. Worked for me

Upvotes: 0

John M
John M

Reputation: 14668

One of my VB .NET Winforms projects wouldn't allow debugging. This was due to the configuration manager set to 'Release' even though the toolbar dropdown indicated 'Debug'.

You need to select the mode dropdown and select the last option 'Configuration Manager' and ensure that the main project is set to 'Debug' and not 'Release'

Upvotes: 0

John S.
John S.

Reputation: 2007

I've encountered this before. Not sure what causes it, but generally it is one of a couple of things to fix it.

  1. make sure you are building in debug and not release
  2. close VS, go to the project's dir and delete the obj and bin directories. Reopen in VS and rebuild.
  3. 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.
  4. 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)
  5. 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.

Tools > Options > Debugging

Tools > Options > Debugging

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):

Debug Hello World

Upvotes: 15

g_brahimaj
g_brahimaj

Reputation: 197

I had the same problem with my desktop application and as this forum says you should mark your project as a startup project, since visual studio has unmarked. It worked just fine for me an I believe it will help other people that may have this problem, since I believe you have finished this project.

Upvotes: 0

Hunter Kingsley
Hunter Kingsley

Reputation: 61

When my default browser was changed to CHROME, I could no longer debug my User Interface. Setting IE back to the default browser fixed it. Alternatively you can attach the process plug-in during debug.

Upvotes: 0

Mukus
Mukus

Reputation: 5033

For me, uninstalling the Redgate's Reflector plugin that had expired fixed it. I spent more than 4 hours uninstalling, rebooting, reverting to older code, etc etc..

Upvotes: 0

user2286810
user2286810

Reputation: 146

I had a similar issue.

I added up:

using namespace std;

and this solved the problem

Upvotes: 0

user3082600
user3082600

Reputation: 11

  1. Right click on the project
  2. Click on the properties.
  3. go to web.
  4. Check the Box for Enable Edit and Continue .

Hope that helps :)

Upvotes: 1

Igor Trkulja
Igor Trkulja

Reputation: 1

I had a similar problem, and solution was absolutely dumb. VS was confused with two instances of Internet Explorer in “Browse with” setting. So, I set Google Chrome (any browser) as default, and then set IE as default again. It deleted the other instance of IE (only one remained) and debugging was enabled. Hope it help!

Upvotes: 0

KMX
KMX

Reputation: 2681

Amazing answers already given but they dont help in the purpose. So here is my finding, no matter if i am late in answering, but it really works for me.

Even if you are developing a web app, just go to the website properties by right-clicking the project and then you see a "Web" tab on left as i have highlighted. Then just check the box saying "Enable Edit and Continue". Thats all you need to do. it works for me!

enter image description here

Upvotes: 0

vijay
vijay

Reputation: 1

try checking your output without debugging Ctrl + F5

good luck

Upvotes: -2

Alex
Alex

Reputation: 1

This is an issue with visual studio 2012. It doesn't ALWAYS show up. I've found that if you stop your program during debugging, or if you close the console window, this will almost always trigger.

However, letting it run to completion isn't enough either, sometimes this just happens.

Also you can build your application in debug mode, go to the output, run the program, and attach to that process. :P

Upvotes: 0

Related Questions