16

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?

Community
  • 1
  • 1
sl3dg3
  • 5,026
  • 12
  • 50
  • 74
  • 1
    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 Jan 26 '12 at 10:31
  • 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 Jan 26 '12 at 10:33
  • ... added some hopefully helpful infos. – sl3dg3 Jan 26 '12 at 10:51
  • Maybe you have no declare the debug for this part of your page for some reason. – Aristos Jan 26 '12 at 12:04
  • ... it has not much to do with pages --> MVC. – sl3dg3 Jan 26 '12 at 12:09

7 Answers7

29

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!

sl3dg3
  • 5,026
  • 12
  • 50
  • 74
  • Same here, such a simple problem - I had my 'Test' configuration set when opening the debugger! – Arran Jun 19 '13 at 15:38
  • 1
    mine wasn't working and my configuration was set to debug, so i changed to release and the back to debug and it worked. – Bachask8 Jan 06 '15 at 15:16
  • This worked for me. Thanks for showing the obvious (which I always miss). – johnny Feb 23 '17 at 15:28
10

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

  • In my case, Visual Studio got confused as to the actual line the breakpoint was on. This answer fixed that issue. – Ian Kemp Jul 15 '14 at 09:39
6

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.

Greg
  • 61
  • 1
  • 2
2

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

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
KMW_Denver
  • 57
  • 1
  • 8
2

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.

erictrigo
  • 989
  • 2
  • 13
  • 41
1

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.

Patrick from NDepend team
  • 13,237
  • 6
  • 61
  • 92
0

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

ecoe
  • 4,994
  • 7
  • 54
  • 72