Share via


How to: Specify a Symbol Path 

To debug your code, the debugger needs PDB files (or older format DBG files) containing symbols for your application. By default, the debugger looks for these files in the same location as your EXE or application.

If you need to debug system or 3rd party DLLs, then you must tell the debugger where the PDB or DBG files for these DLLs are as well, so 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.

To Add a Pathname to the symbol file (.pdb or .dbg) Locations List

  1. From the Tools menu, choose Options.

  2. In the Options dialog box, click the Debugging node to open it.

  3. Under Debugging, select the Symbols category.

  4. 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.

  5. Edit the text to add a new pathname. Statement completion helps you get the format right.

  6. 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.

  7. 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 machine the cache directory refers to a directory on the remote machine.

  8. Click OK.

To Remove a Pathname from the Symbols Path List

  1. Open the Options dialog box and go to the Symbols page, as described in the previous procedure.

  2. Select a pathname in the Symbol file (.pdb) locations box.

  3. Click the red "X" icon or press the Delete key.

  4. Click OK.

Loading Symbols Manually

You can load symbols manually from the Modules window.

To Load Symbols Manually

  1. Right-click in the Modules window and choose Find Symbols from the shortcut menu.

  2. 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, navigate to 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

Reference

Symbols, Debugging, Options Dialog Box

Concepts

DBG Files
PDB Files (C++)
PDB Files (C#, J#, and Visual Basic)
Installing Symbols for Debugging System Call Crashes

Other Resources

Debug Settings and Preparation