Muokkaa

Jaa


Keeping a Log File in CDB

CDB can write a log file that records the debugging session. This log file contains all of the commands that you type and the responses from the debugger.

Opening a New Log File

To open a new log file, or to overwrite a previous log file, do one of the following:

  • Before you start the debugger, set the _NT_DEBUG_LOG_FILE_OPEN environment variable.

  • When you start the debugger, use the -logo command-line option.

  • Enter the .logopen (Open Log File) command. If you use the /t option, the date and time are appended to your specified file name. If you use the /u option, the log file is written in Unicode instead of in ASCII.

Appending to an Existing Log File

To append command window text to a log file, do one of the following:

  • Before you start the debugger, set the _NT_DEBUG_LOG_FILE_APPEND environment variable.

  • When you start the debugger, use the -loga command-line option.

  • Enter the .logappend (Append Log File) command. If you are appending to a Unicode log file, you must use the /u option.

Closing a Log File

To close an open log file, do the following:

Checking Log File Status

To determine the log file status, do the following: