visual studio 2010 c ++调试符号加载但找不到源代码 [英] visual studio 2010 c++ debugging symbols loaded but can't find source code

查看:597
本文介绍了visual studio 2010 c ++调试符号加载但找不到源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在2010年之前指定了符号(pdb)文件,使其正确加载,但是我得到无源可用错误和浏览查找源代码是灰色的。有没有人知道我如何指定源代码目录或查看pdb内部以找出它在哪里?

I've specified symbol (pdb) file inside 2010 so that it is loaded correctly but I get the No source available error and the Browse to Find Source Code is greyed out. Does anyone know how I can specify the source code directory or look inside the pdb to find out where it is?

编辑:我的DLL被外部程序调用。我的DLL中发生错误,所以我有源代码。发生错误时,我单击调试,pdb符号被加载,但不是源。

My DLL is being called by an external program. The error is happening inside my DLL so I have the source code. When the error occurs I click Debug, the pdb symbols are loaded but not the source.

推荐答案

如果从其构建目录中移动DLL,则调试器不太可能找到源代码文件本身。您可以做的第一件事是右键单击解决方案资源管理器窗口中的解决方案根节点,属性,公共属性,调试源文件,并将路径添加到DLL项目源目录。

If you moved the DLL from its build directory then the debugger is unlikely to be able to find the source code files itself. First thing you can do is to right-click the Solution root node in the Solution Explorer window, Properties, Common Properties, Debug Source Files and add the path to the DLL project source directory.

第二种方式:调试器首次提示您需要找到源代码文件。如果您在该对话框上单击取消,当您不知道它是真正的问题时,很常见,IDE会记住您的选择,不会再提示您。通过删除或重命名解决方案目录中的.suo文件来解决这个问题。

Second way: the debugger prompts you the first time it needs to find a source code file. If you ever clicked Cancel on that dialog, pretty common thing to do when you don't know what it is really asking, then the IDE remembers your selection and won't prompt you again. Fix that by deleting or renaming the hidden .suo file in the solution directory.

这篇关于visual studio 2010 c ++调试符号加载但找不到源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆