您的位置:首页 > 产品设计 > 产品经理

[IDE-Visual Studio]The breakpoint will not currently be hit. No symbols have been loaded for this document.[Reshipment]

2010-02-06 16:08 639 查看
When debugging my application I encounter a problem with error message "The breakpoint will not currently be hit. No symbols have been loaded for this document.", which I fould in the end is due to the assembly loaded from GAC not the bin folder. The passage blow helped me a lot during the problem solving. I post this blog is to remind myself...

 

[Reshipped from Doug] ==================

In the Visual Studio IDE, when I set a breakpoint at a line of code, and start debugging, the breakpoint becomes that hollow maroon circle with a warning that says The breakpoint will not currently be hit. No symbols have been loaded for this document.

 

While debugging in Visual Studio, click on Debug > Windows > Modules. The IDE will dock a Modules window, showing all the modules that have been loaded for your project.

Look for your project's DLL, and check the Symbol Status for it.

If it says Symbols Loaded, then you're golden. If it says something like Cannot find or open the PDB file, right-click on your module, select Load Symbols, and browse to the path of your PDB.

I've found that it's sometimes necessary to

stop the debugger

close the IDE

close the hosting application

nuke the obj and bin folders

restart the IDE [Nick - This step is necessary]

rebuild the project

go through the Modules window again

Once you browse to the location of your PDB file, the Symbol Status should change to Symbols Loaded, and you should now be able to set and catch a breakpoint at your line in code.

I'm not really an expert on this, but I welcome any questions anyone may have, and I'll try to help out if you still can't get it to work.

 

===================

Nick
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐