No symbols loaded 解决方法

How to use a symbol server with the Visual Studio .NET debugger

http://support.microsoft.com/default.aspx?scid=kb;en-us;319037

This step-by-step article describes how to use the Visual Studio .NET debugger with a symbol server to load symbols from the Microsoft Symbol Server.

Click the Play button to view this streaming media demonstration.

http://support.microsoft.com/servicedesks/ShowMeHow/319037.asx




You must have symbol information when you debug applications that may stop responding (hang or crash). Symbol files provide a footprint of the functions that are contained in executable files and dynamic-link libraries (DLLs). Additionally, symbol files can present a roadmap of the function calls that lead to the point of failure. For example, you must have the symbols when you dump call stacks inside a debugger.

For more information about a Microsoft Symbol Server that contains symbol files for Microsoft operating system components and other Microsoft products, click the following article number to view the article in the Microsoft Knowledge Base:
311503  (http://support.microsoft.com/kb/311503/ ) Use the Microsoft Symbol Server to obtain debug symbol files
Note The Microsoft Symbol Server in article 311503 has not been updated to include the symbols for the Microsoft .NET Framework. Therefore, these symbol files are not loaded. Microsoft is working to make the .NET Framework symbols available on a public symbol server.

Additionally, Microsoft Product Support Services has not tested and does not support the use of Microsoft Symbol Server with Visual Studio .NET. This article is only provided as information because of customer inquiries.

Back to the top
Update the debugging files

   1. Download and then install the latest Debugging Tools for Windows kit. To download the latest Debugging Tools for Windows kit, visit the following Microsoft Web site:
      http://www.microsoft.com/whdc/devtools/ddk/default.mspx (http://www.microsoft.com/whdc/devtools/ddk/default.mspx)
   2. Locate the Symsrv.dll file in the /Program Files/Debugging Tools for Windows folder or the C:/WINDBG folder.

      Note Because Debugging Tools may be installed in a different folder, search on your hard disk for Symsrv.dll if the file is not located in these folders.
   3. Quit Visual Studio .NET if it is open.
   4. Copy Symsrv.dll to the C:/Program Files/Microsoft Visual Studio .NET/Common7/IDE folder. The next time that you start Visual Studio .NET, or you start Visual Studio .NET, you can use the Symsrv.dll file to find symbol servers that you specify.

Back to the top
Specify the path to the Symbol Server

   1. Start Visual Studio .NET.
   2. Press CTRL+ALT+L to open the Solution Explorer window.
   3. Right-click the solution, and then click Properties.
   4. Expand the Common Properties and the Debug Symbol Files nodes.
   5. In the Debug Symbol Files property page, type the following symbol server path:
      symsrv*symsrv.dll*c:/localcache*http://msdl.microsoft.com/download/symbols
      where c:/localcache is the local folder where the symbols are downloaded, and where the "http" address is the address to the Microsoft Symbol Server that contains symbols for the operating system and other Microsoft products.

      Note Because the symbols are downloaded from the Internet, the Visual Studio .NET debugger may debug slowly the first time because the debugger must download all of the required symbol files.
   6. On the Debug menu, point to Windows, and then click Modules to verify that symbols are loaded for a particular module while the debugger is running. The Modules window states whether the symbol information has been loaded for the module.
   7. If you want to set the symbol server path for all solutions and projects, you can set a global environment variable in Control Panel. To do this, follow these steps:
         1. In Control Panel, double-click System.
         2. On the Advanced tab, click Environment Variables.
         3. Under System Variables, click New, and then add a variable as "_NT_SYMBOL_PATH".
         4. Set the value of the variable to a symbol server path, for example:
            symsrv*symsrv.dll*c:/localcache*http://msdl.microsoft.com/download/symbols

Note The Visual Studio .NET debugger does not find symbols for managed components if you set the symbol server path in Solution Properties. If you have symbols for managed components, you must use the _NT_SYMBOL_PATH environment variable for the debugger to recognize symbol files of a managed component on a symbol server.
Back to the top

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: "Symbols loaded"不是错误信息,它是调试器输出的一条信息。它表示调试器已经成功加载了可执行文件中的符号表,这些符号表包含了变量、函数、类等的信息,以便在调试过程中能够正确地显示变量名称和函数名称等信息。 如果你的程序出现了错误,调试器通常会输出更详细的错误信息,例如内存访问错误、变量未初始化等等。因此,如果你想解决程序中的错误,你需要查看调试器输出的完整信息,而不仅仅是"Symbols loaded"这条信息。 ### 回答2: C代码出现"Symbols loaded"报错是因为程序中引用的符号(变量、函数或其它标识符)未能被正确加载。这种错误通常发生在程序运行时,编译过程通常不会受到影响。 这种报错的原因有很多可能性,以下是一些可能导致"Symbols loaded"报错的原因: 1. 未正确链接库文件:如果程序依赖于某些库,但在编译或连接阶段未能正确链接这些库文件,就会导致无法加载符号。解决方法是确保正确链接需要的库文件。 2. 编译器或IDE错误:在编译或链接时,编译器或IDE(集成开发环境)可能存在错误。这可能是版本不匹配、配置错误或软件本身的一个问题。可以尝试更新编译器或IDE,并确保其正确配置。 3. 符号不存在或不可见:如果程序中引用的某个符号在代码中不存在或无法访问(如私有符号),那么加载的时候也会出现报错。解决方法是检查代码中引用的符号是否正确且可见。 4. 编译器优化:某些编译器会对代码进行优化,从而删除一些不使用的符号。这可能导致在程序运行时无法加载这些被删除的符号。可以尝试关闭编译器优化或者修改代码以确保需要的符号不被删除。 综上所述,"Symbols loaded"报错可能是由于链接错误、编译器或IDE问题、符号不存在或不可见、编译器优化等原因导致的。正确解决这个问题需要对具体的代码和环境进行详细的排查和调试。 ### 回答3: 在C的代码中,出现"Symbols loaded"的报错可能有以下几个原因: 1. 编译器错误:编译器在处理代码时可能会出现错误,导致加载符号表时出错。这可能是由于语法错误、缺少头文件、链接错误等引起的。在这种情况下,您需要检查并修复代码中的错误。 2. 项目配置问题:如果在项目配置中未正确设置符号加载选项,也会导致该错误。在使用某些IDE或编译器时,需要手动配置以加载符号表。您需要确保已正确设置和启用符号加载选项。 3. 缺少库文件:如果您的代码依赖于某些库文件,但未能正确链接或安装这些库文件,则会导致符号加载错误。在这种情况下,您需要检查是否正确链接和安装了所需的库文件。 4. 运行环境问题:某些情况下,符号加载错误可能是由于运行环境的问题引起的。例如,您的代码可能需要在特定的操作系统或硬件上运行,但当前的环境不符合要求,导致加载符号表失败。 为了解决这个问题,您可以尝试以下几个步骤: 1. 检查代码中是否存在语法错误或其他编译器错误,并修复它们。 2. 检查项目配置,并确保符号加载选项被正确设置和启用。 3. 确保所需的库文件已正确链接和安装。 4. 检查运行环境是否符合代码的需求,并进行必要的调整。 如果以上步骤都没有解决问题,您可以尝试搜索相关错误信息或详细描述您的问题,以便找到更具体的解决方法
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值