Visual Studio 2015 project no longer runs in debug mode

Sen picture Sen · Aug 13, 2015 · Viewed 36.7k times · Source

This is what I get even when I run in the Debug configuration:

The way I got this to show was by enabling "Just My Code" and warn if there isn't any user code on launch. This is something that recently happened to our project, and I'm not sure what we did to cause this. But I've been unable to fix it. Breakpoints won't fire and quick watch gives weird results.

I've tried googling the issue, but none of the standard "break points won't fire" solutions have worked. I'm all out of ideas.

I've checked the configuration manager and every project is also set to Debug there as well.

Enter image description here

I turned off "Enable Optimaizations", and I no longer get the "you are debugging a Release build" dialog. It runs and stops on breakpoints again! However the output window displays this at start up:

Symbols for the module 'Navigo.exe' were not loaded.

  1. Use a debug build configuration or disable the debug option 'Enable Just My Code'.
  2. Check the 'Symbols' settings under debugging options.

So this solves my primary problem of no longer being able to use breakpoints and the popup. Which is odd since I thought you needed symbols to be loaded for breakpoints to work. So how can the breakpoints work if the symbols aren't loaded? Maybe it's just a bad message?

Answer

stuartd picture stuartd · Aug 13, 2015

Use the Configuration Manager to check what the actual settings are for the Debug configuration - it's at menu BuildConfiguration Manager... - in case they are set to use Release:

Configuration Manager

Also, make sure the project is defining DEBUG correctly, and that "Optimize Code" is not checked:

Properties