pa (Step to Address)

The pa command executes the program until the specified address is reached, displaying each step.


[~Thread] pa [r] [= StartAddress] StopAddress ["Command"]


pa [r] [= StartAddress] StopAddress ["Command"]


Specifies threads to continue executing. All other threads are frozen. For more information about the syntax, see Thread Syntax. You can specify threads only in user mode.

Turns on and off the display of registers and flags. By default, the registers and flags are displayed. You can disable register display by using the par, pr, tr, or .prompt_allow -reg commands. All of these commands control the same setting and you can use any of them to override any previous use of these commands.

You can also disable register display by using the l-os command. This setting is separate from the other three commands. To control which registers and flags are displayed, use the rm (Register Mask) command.

Specifies the address where the debugger begins execution. Otherwise, the debugger begins at the instruction that the instruction pointer points to. For more information about the syntax, see Address and Address Range Syntax.

Specifies the address where execution will stop. This address must match the exact address of an instruction.

Specifies a debugger command to execute after the step is performed. This command is executed before the standard pa results are displayed. If you also use StopAddress, the specified command is executed after StopAddress is reached (but before the results from the final step are displayed).



User mode, kernel mode


Live debugging only



Additional Information

For more information about related commands, see Controlling the Target.


The pa command causes the target to begin executing. This execution continues until the specified instruction is reached or a breakpoint is encountered.

Note If you use this command in kernel mode, execution stops when an instruction is encountered at the specified virtual address in any virtual address space.

During this execution, all steps are displayed explicitly. Called functions are treated as a single unit. Therefore, the display of this command is similar to what you see if you execute p (Step) repeatedly until the program counter reaches the specified address.

For example, the following command explicitly steps through the target code until the return address of the current function is reached.

0:000> pa @$ra 

The following example demonstrates using the pa command along with the kb command to display the stack trace:

0:000> pa 70b5d2f1 "kb"

Send comments about this topic to Microsoft