Debugging Tools for Windows

SetScopeFrameByIndex

The SetScopeFrameByIndex method sets the current scope to the scope of one of the frames on the call stack.

HRESULT
  IDebugSymbols3::SetScopeFrameByIndex(
    IN ULONG  Index
    );

Parameters

Index
Specifies the index of the stack frame from which to set the scope. The index counts the number of frames from the top of the call stack. The frame at the top of the stack, representing the current call, has index zero.

Return Value

S_OK
The method was successful.

This method may also return error values. See Return Values for more details.

Interface Version

SetScopeFrameByIndex is available in IDebugSymbols3 and later versions.

Comments

When an event occurs and the debugger engine breaks into a target, the scope is set to the current function call (the function that was executing when the event occurred). Calling this method with Index set to one will change the current scope to the caller of the current function; with Index set to two, the scope is changed to the caller's caller, and so on.

For more information about scopes, see Scopes and Symbol Groups.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

See Also

.frame (Set Local Context), GetCurrentScopeFrameIndex, SetScopeFromStoredEvent, SetScope

Build machine: CAPEBUILD