Export (0) Print
Expand All

DBG Files

C/C++ Only

DBG files are portable executable (PE) format files that contain debug information in Codeview format for the Visual Studio debugger (and possibly other formats, depending on how the DBG was created). When you do not have source for certain code, such libraries or Windows APIs, DBG files permit debugging. DBG files also permit you to do OLE RPC debugging.

You can use the REBASE.EXE utility to strip debug information from a PE-format executable and store it in a DBG file. The file characteristic field IMAGE_FILE_DEBUG_STRIPPED in the PE file header tells the debugger that Codeview information has been stripped to a separate DBG file.

You can download and install system DBG files that contain symbols for debugging calls to Windows APIs. For more information, see Installing System Debug Symbols.

When you debug using symbols from a DBG file, you must use the fully decorated names. For example, to set a breakpoint on a call to the Windows sndPlaySound function, you must specify _sndPlaySoundA@8.

The Visual Studio debugger is not designed for debugging protected mode kernel code, even with DBG symbols.

For user mode debugging, Visual Studio requires the following files:

  • On a Windows NT machine, DBG files in the Windows NT \winnt\SYMBOLS\DLL directory.

    (winnt is the directory where Windows NT is installed).

  • On a Windows 2000 machine, DBG and PDB files in the \win2k\SYMBOLS\DLL directory.
  • On a Windows XP machine, PDB files in the \winxp\SYMBOLS\DLL directory.

For more information on DBG files, see the following Knowledge Basic article:

  • Q121366, INFO: PDB and DBG Files - What They Are and How They Work

You can find Knowledge Base articles in the MSDN library or at http://support.microsoft.com.

See Also

Debug Settings and Preparation | Installing System Debug Symbols

Show:
© 2014 Microsoft