How to: Specify a Symbol Path
This topic applies to:
Edition |
Visual Basic |
C# |
C++ |
Web Developer |
---|---|---|---|---|
Express |
||||
Standard |
||||
Pro and Team |
Table legend:
Applies |
|
Does not apply |
|
Command or commands hidden by default. |
To debug your code, the debugger needs PDB files (or older format DBG files) that contain symbols for your application. By default, the debugger looks for these files in the same location as your EXE or application.
If you must debug system or third-party DLLs, then you must tell the debugger where the PDB or DBG files for these DLLs are also. Therefore, you must specify the paths where the debugger can find these DBG or PDB files. For more information see How to: Use a Symbol Server.
Note
Make sure the symbol server is trustworthy. Otherwise you may become exposed to security threats.
For remote debugging, symbol files for managed code should be located on the remote computer, whereas symbol files for native code should be located on the local computer. If you are using a symbol server, the symbol cache location for managed code should be on the remote computer and the symbol cache location for native code on the local computer.
To add a pathname to the symbol file (.pdb or .dbg) locations list
On the Tools menu, choose Options.
In the Options dialog box, click the Debugging node to open it.
Under Debugging, select the Symbols category.
On the Symbols page, there is a box that says Symbol file (.pdb) locations. Above the box are four icons. Click the folder icon and editable text appears in the Symbol file (.pdb) locations box.
Edit the text to add a new path. Statement completion helps you get the format right.
Make sure Search the above locations only when symbols are loaded manually is not selected, unless you want to load symbols manually when you debug.
If you are using symbols on a remote symbol server, you can improve performance by specifying a local directory that symbols can be copied to. To do this, use the Cache symbols from symbol server to this directory box. Note that if you are debugging a program on a remote computer the cache directory refers to a directory on the remote computer.
Click OK.
To remove a pathname from the symbols path list
Open the Options dialog box and go to the Symbols page, as described in the previous procedure.
Select a path in the Symbol file (.pdb) locations box.
Click the red "X" icon or click Delete.
Click OK.
Loading Symbols Manually
You can load symbols manually from the Modules window.
To load symbols manually
Right-click in the Modules window and choose Find Symbols on the shortcut menu.
The debugger searches the symbol path to try to find symbols itself. If symbols were not found, the Find Symbols dialog box appears. In the Find Symbols dialog box, locate the symbols file (PDB or DBG file) you want to load. When the name of the symbols file appears in the File Name box, click OK.
See Also
Concepts
PDB Files (C# and Visual Basic)
Installing Symbols for Debugging System Call Crashes
Reference
Symbols, Debugging, Options Dialog Box