简体   繁体   English

.net调试打印输出中“未加载符号”是什么意思

[英]what does 'no symbols loaded' mean in a .net debug printout

I am trying to debug an exe that runs in visual studio but crashes in the server environment. 我正在尝试调试在Visual Studio中运行但在服务器环境中崩溃的exe。 When it crashes, the server gives me a chance to 'debug' it in visual studio--which spits out a printout with a long list of lines that read 'no symbols loaded.' 当它崩溃时,服务器使我有机会在Visual Studio中对其进行“调试”,从而将打印输出中的一行很长的行读出“未加载任何符号”。 What does this mean? 这是什么意思? What are the 'symbols' it is trying to load? 它试图加载的“符号”是什么?

Here are the first two lines of the crash printout: 这是崩溃打印输出的前两行:

'AutoMatcher.exe': Loaded 'PathToMyExe\\MyExecutables.exe', No native symbols in symbol file. 'AutoMatcher.exe':已加载'PathToMyExe \\ MyExecutables.exe',符号文件中没有本机符号。 - 'AutoMatcher.exe': Loaded 'C:\\Windows\\System32\\ntdll.dll', No symbols loaded. -'AutoMatcher.exe':已加载'C:\\ Windows \\ System32 \\ ntdll.dll',未加载任何符号。

many more like this... ending 'no symbols loaded' 像这样的更多...结束“未加载符号”

"Symbols" in this context means the function-dereferencing index stored in the [AssemblyName].PDB file. 在此上下文中,“符号”表示存储在[AssemblyName].PDB文件中的函数引用索引。 Debugging symbols are used to generate detailed stack traces in the event of an exception. 发生异常时,调试符号用于生成详细的堆栈跟踪。 Production-release code is deployed without debugging files/symbols for performance and security reasons. 出于性能和安全原因,生产发布代码的部署无需调试文件/符号。

When developing a .NET application, the debugging symbols for your managed code are built when you build in Debug mode. 开发.NET应用程序时,在调试模式下进行构建时,将为托管代码构建调试符号。 However, symbols for OS-level functions are not installed by default. 但是,默认情况下未安装OS级功能的符号。 If you're doing OS-level calls and want to be able to debug the OS, the Windows debugger symbols are available at MSDN . 如果您正在进行操作系统级别的调用,并且希望能够调试操作系统,则可以在MSDN上找到Windows调试器符号。

这意味着调试器不知道该DLL中的任何函数名称(“符号”)。

Visual Studio Symbol files are files with .pdb extensions that are produced by the linker when an executable (DLL or .EXE or other types) is built. Visual Studio符号文件是带有.pdb扩展名的文件,这些文件是在构建可执行文件(DLL或.EXE或其他类型)时由链接程序生成的。

Having matching .pdb files is essential for debugging as these files contain, among other streams of information, association between assembly code and source-code lines. 具有匹配的.pdb文件对于调试是必不可少的,因为这些文件除其他信息流之外还包含汇编代码和源代码行之间的关联。

You can find more information on .pdb files here http://support.microsoft.com/kb/121366 您可以在http://support.microsoft.com/kb/121366上找到有关.pdb文件的更多信息。

To debug your server-side scenario you need to copy .pdb files from your build onto the server. 要调试服务器端方案,您需要将.pdb文件从内部版本复制到服务器上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM