Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade to Visual Studio 2015 and now can't hit break points in debugging

I have a multi-project solution that I was building in Visual Studio 2013 and it was working fine but now that I have upgraded to Visual Studio 2015 I can no longer hit break points in debug mode for any project exect the main project selected as the Startup project in the Project Properties page. I used to be able to click on the other projects and just choose Debug -> Start New Instance. I am getting the error The breakpoint will not currently be hit. No symbols have been loaded for this document. I have tried a lot of things found on Google including:

  • Clean/Rebuild
  • Delete the OBJ and BIN folder form the projects
  • Did VS repair
  • Rebooted
  • Uninstalled/Reinstalled
  • Confirmed Define DEBUG constraint is enabled for Properties -> Build
  • Confirmed Optimize Code is unchecked for Properties -> Build
  • Confirmed Properties -> Build => Platform target was set to Any CPU for all projects
  • Tried running VS using "Run as Administrator"
  • Deleted all the files in /AppData/Local/Temp/Temporary ASP.Net Files/
  • Made sure Debug -> Attack to Process -> Select had "Automatically determine the type of code to debug" was selected
  • Made sure the Properties -> Web -> Debuggerts had ASP.Net checked (my properties has ASP.NEt and Enable Edit and Continue Checked, Natvie Code SQL Server and Silverlight unchecked)
  • Confirmed Target framework in Properties -> Application was set to the same version (4.6) as in the Web.Config/App.Config files.

So what am I missing here? Why can I no longer debug the other projects?

like image 254
Matthew Verstraete Avatar asked Jul 27 '15 02:07

Matthew Verstraete


People also ask

Why are my breakpoints not being hit?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

How do you fix the breakpoint will not currently be hit Visual Studio?

For this, simply open your "Solution Explorer", select your "Solution" and right click on it, Select "Clean Solution", once solution is cleaned, which will delete all the compiled and temporary files associated with a solution, select "Build" solution and then check if issue exists.

How do I fix breakpoint in Visual Studio?

Hover over the breakpoint symbol, choose the Settings icon, and then select Remove breakpoint once hit in the Breakpoint Settings window.

How do I show breakpoints in Visual Studio?

Visual Studio's/Atmel Studio's Breakpoint Window gives you an overview of all breakpoints you have set in your project. You open the Breakpoint Window with the menu item Debug > Windows > Breakpoints or by pressing [Alt+F9].


1 Answers

I had a similar problem, when I created a new build configuration. After hunting around settings in VS2015, I noticed that there were no *.pdb files in my build output. Obviously, debugging would not work if there were *.pdb files.

The fix for me was to go into every project's properties -> 'build' page -> click the "advanced" button at the bottom of the page -> In the dialog's 'Output' section, I set "debug info" to equal "full".

Basically, I created a new solution and project and copied all the build properties into the solution that the debugger was not stopping at break points anymore. In addition to the setting above, I also changed the following setting to match the default debug settings:

  • I set on the same advanced page "Internal Compiler Error Reporting" to "prompt"
  • In the main 'build' page, I checked in the 'general' section "Define DEBUG constant" and "Define TRACE constant"
like image 162
Hezi Avatar answered Oct 06 '22 15:10

Hezi