vb.net 当前不会命中断点。尚未为此文档加载任何符号。
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27131550/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The breakpoint will not currently be hit. No symbols have been loaded for this document.
提问by Ankit
I'm trying to debug an application but I'm constantly getting the following error message: "The breakpoint will not currently be hit. No symbols have been loaded for this document." when I attach it to the desired process.
我正在尝试调试应用程序,但我不断收到以下错误消息:“当前不会命中断点。没有为此文档加载任何符号。” 当我将它附加到所需的过程时。
After digging in a bit, I realized that many pdb files are not getting created when I build the solution although the dll's are available.
在深入研究之后,我意识到尽管 dll 可用,但在我构建解决方案时并没有创建许多 pdb 文件。


回答by Simpson Kamonere
I had a similar problem from a web api code I got from another developer. Turned out Just My Code was set to true. You should see in your output window a line that says symbols were not loaded. To turn Just My Code off go to tools then options, debugging, general and untick Enable Just My Code
我从另一个开发人员那里得到的 web api 代码中遇到了类似的问题。结果只是我的代码被设置为真。您应该在输出窗口中看到一行表示未加载符号。要关闭仅我的代码,请转到工具,然后选择选项、调试、常规并取消勾选启用仅我的代码
回答by oldDavid
I don't know why the .pdb's aren't being created when you build the solution, but a couple of places to check. Go into the Projects properties, Compile settings. Under Advanced Compile Options make sure that Generate debug info isn't set to None. Check for both Debug and Release configurations as well as any configurations you might have created. Also verify that the build output path is pointing to where you want it to be. You also could try searching your drive to see if the .pdb's are being created in another location (unlikely but worth a try?)
我不知道为什么在构建解决方案时没有创建 .pdb,但有几个地方需要检查。进入项目属性,编译设置。在 Advanced Compile Options 下,确保 Generate debug info 未设置为 None。检查调试和发布配置以及您可能创建的任何配置。还要验证构建输出路径是否指向您想要的位置。您也可以尝试搜索您的驱动器以查看 .pdb 是否是在另一个位置创建的(不太可能但值得一试?)
回答by Vojta Novák
I had the same problem. Unchecking "Native Code"(in Project --> Properties --> tab Web --> section Debuggers --> Native Code) works for me.
我有同样的问题。 取消选中“本机代码”(在项目 --> 属性 --> 选项卡 Web --> 调试器部分 --> 本机代码中)对我有用。
回答by CResults
Another gotcha, I've run into this issue when projects in my solution were set to release configuration (I'd set it that way previously to diagnose a publish issue). Setting back to debug brings back the breakpoints.
另一个问题,当我的解决方案中的项目被设置为发布配置时,我遇到了这个问题(我之前设置过这种方式来诊断发布问题)。设置回调试会带回断点。
回答by Miloslav Va?í?ek
I had the same problem and I solved this by disable "Export at background".
我遇到了同样的问题,我通过禁用“后台导出”解决了这个问题。

