Debugging Tools for Windows

.idle_cmd (Set Idle Command)

The .idle_cmd command sets the idle command. This is a command that is executed whenever control returns from the target to the debugger. For example, when the target reaches a breakpoint, this command executes.

Syntax

.idle_cmd
.idle_cmd String  
.idle_cmd /d

Parameters

String
Specifies the string to which the idle command should be set.
/d
Clears the idle command.

Environment

This command cannot be used in script files.

Modes user mode, kernel mode
Targets live, crash dump
Platforms all

Comments

When .idle_cmd is used with no parameters it displays the current idle command.

In WinDbg, idle commands are stored in workspaces.

Here is an example. The idle command is set to r eax. Then, becausethe debugger is already idle, this command immediately executes, displaying the eax register:

windbg> .idle_cmd r eax 
Execute when idle: r eax
eax=003b0de8

Build machine: CAPEBUILD