Share via


NTDEBUG

Use the NTDEBUG environment variable to specify what kind of symbolic information that you want the Build utility to put in the symbol files that it creates.

This environment variable is rarely used in the Sources file. Instead, it is set in the environment by the Windows Driver Kit (WDK).

To indicate a checked (or debug) build, specify:

NTDEBUG=ntsd 

To indicate a free (or retail) build, specify:

NTDEBUG= ntsdnodbg

The only difference between the two of them is that specifying "ntsd" causes the Build utility to define DBG=1, while specifying "ntsdnodbg" causes it to define DBG=0.

The DBG variable is tested by several debugging-related driver routines. For full details, see Conditional Compilation and the Build Environment. You can also use #if DBG statements in your source code to conditionally compile free and checked versions of your driver.

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011