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

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.

 

  1. 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.
  2. Look for your project's DLL, and check the Symbol Status for it.
  3. 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值