.f+, .f- (Shift Local Context)

The .f+ command shifts the frame index to the next frame in the current stack. The .f- command shifts the frame index to the previous frame in the current stack.




User mode, kernel mode


Live, crash dump




Additional Information

For more information about the local context and other context settings, see Changing Contexts. For more information about how to display local variables and other memory-related commands, see Reading and Writing Memory.


The frame specifies the local context (scope) that the debugger uses to interpret local variables

The .f+ and .f- commands are shortcuts for moving to the next and previous frames in the current stack. These commands are equivalent to the following .frame commands, but the .f commands are shorter for convenience:

  • .f+ is the same as .frame @$frame + 1.

  • .f- is the same as .frame @$frame - 1.

The dollar sign ($) identifies the frame value as a pseudo-register. The at sign (@ causes the debugger to access the value more quickly, because it notifies the debugger that a string is a register or pseudo-register.

When an application is running, the meaning of local variables depends on the location of the program counter, because the scope of such variables extends only to the function that they are defined in. Unless you use an .f+ or .f- command (or a .frame command), the debugger uses the scope of the current function (the current frame on the stack) as the local context.

The frame number is the position of the stack frame within the stack trace. You can view this stack trace by using the k, kb, kc, kd, kp, kP, kv (Display Stack Backtrace) command or the Calls window. The first line (the current frame) represents frame number 0. The subsequent lines represent frame numbers 1, 2, 3, and so on.

You can set the local context to a different stack frame to view new local variable information. However, the actual variables that are available depend on the code that is executed.

The debugger resets the local context to the scope of the program counter if any program execution occurs. The local context is reset to the top stack frame if the register context is changed.



Send comments about this topic to Microsoft