16
votes

I had the famous “The breakpoint will not currently be hit. No symbols have been loaded for this document.” - problem and was inspired by this thread:

I started the debugger, opened Debug -> Window -> Modules, right-click on the assembly -> Symbol Load Information. It points to a strange spot:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files{myProjectFolder}\8df46672\bbaeb99e\assembly\dl3\c29c5e19\aa46dcf7_10dccc01{myProject}.pdb: Symbols loaded.`

It fixed the problem for me temporarely when I deleted {myProjectFolder}. But it still points to this .pdb - file (VS recreates the temporary folder after deleting). I guess it should point to the .pdb in the bin-directory though, as it does in other assemblies. How am I supposed to fix this? Or is this a normal behaviour?

Thx for any tipps...

Edit: It is an ASP.NET - Project (.NET 4.0), MVC 3. No COM-libraries included so far. I have now deleted the above mentioned directory again, and ended up once again with “The breakpoint will not currently ...". If I open the Modules-window, Symbol Status shows "Skipped loading simbols." for all assemblies, except for App_global.asax.exot9a5x.dll.

Edit 2: The website is configured to run on the local IIS 7. If I change to Visual Studio Development Server, debugging works fine. Seems to be related with IIS?

8
If this is an asp.net project then in most cases debugging a different project than the startup one will cause problems for various reasons.hyp
Could you add a few more details such as what sort of project this is (Console, Windows app etc) and whether you are using anything like COM etc. There are quite a few instances I've run into this problem because a previous COM registration failed to unregister.Bertie
... added some hopefully helpful infos.sl3dg3
Maybe you have no declare the debug for this part of your page for some reason.Aristos
... it has not much to do with pages --> MVC.sl3dg3

8 Answers

28
votes

Turns out that I had set the configuration to Release when I started the debugger. When I change it to Debug, it works as expected!

10
votes

IIS 7, Visual Studio 2012, Publishing to Local IIS and debugging from Visual Studio.

The problem arises because the web application is not able to pick up the PDB from the Temporary ASP.NET Folder

Before doing anything, Restart the app_pool for your web application in IIS

6
votes

Another solution to the break point issue with a javascript file is to clear IE9 cache. I ran into this issue after updating/saving a js file. Visual Studio 2012's debugger will not update the .pdb until I went into Internet options and deleted the temporary internet files. Hope this will save someone some time.

2
votes

Just a note on my problem with this, it's seems kind of silly in the end, but still I wasted about an hour in a panic.

I had to uninstall nuget in order to upgrade it. After installing the new nuget and the package that I was after I got the breakpoint error.

Turns out, that during those installations somehow, my publish settings lost the specific port that I was running the dev project on. Being that I was so used to that port number for the last 4 months, I didn't even think about it, but the whole time I thought I was looking at the dev machine, it was not actually running on that port, and I was looking at cached pages that were already up in my browser. DER!

Probably, sounds dumb, but if it helps someone.

Happy Coding, K

2
votes

To solve this issue in VS 2015, I had to:

  1. Right click on the project, Properties -> Build
  2. Click on Advanced, which opens the Advanced Build Settings
  3. Set the Debug Info to "pdb-only" or "full"

The problem appeared when I messed up with the build configuration manager and added my own. Somehow, that changed the Debug Info setting in the project.

1
votes

I answered a similar question that may solve your problem. It was a common mistake to leave checked "exclude generated debug symbols" in publish settings. Look my answer.

0
votes

To fix this issue in Web.config I just had to add debug="true"

  <system.web>
    <compilation targetFramework="4.0" debug="true">

What helped me to find this solution has been looking at the Modules windows while debugging and saw that for my ASP.NET DLLs loaded I had: Binary was not built with debug information.

0
votes

Ensure you not only install VS2010 but also VS2010 Service Pack 1.

I tried all solutions posted, including reinstalling - even on a new computer with no success! You need the service pack. After you get it, try the other posted solutions if the problem persists.

Source: http://blogs.msdn.com/b/aseemb/archive/2012/09/08/not-able-to-run-unit-tests-when-visual-studio-2010-and-visual-studio-2012-are-installed-side-by-side.aspx