Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

“The breakpoint will not currently be hit. No symbols have been loaded for this document.” - .pdb loaded from wrong place?

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?

like image 244
sl3dg3 Avatar asked Jan 26 '12 10:01

sl3dg3


People also ask

How do I fix No symbols have been loaded for this document?

"No Symbols have been loaded for this document"Go to the Modules window (Debug > Windows > Modules) and check whether your module is loaded. If your module is loaded, check the Symbol Status column to see whether symbols have been loaded.

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.


2 Answers

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!

like image 126
sl3dg3 Avatar answered Nov 15 '22 22:11

sl3dg3


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

like image 20
Alfredo Cerritos Avatar answered Nov 15 '22 20:11

Alfredo Cerritos