Поделиться через


List Call Stack Command

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Displays the current call stack.

Syntax

Debug.ListCallStack [/Count:number] [/ShowTypes:yes|no]
[/ShowNames:yes|no] [/ShowValues:yes|no] [/ShowModule:yes|no]
[/ShowLineOffset:yes|no] [/ShowByteOffset:yes|no]
[/ShowLanguage:yes|no] [/IncludeCallsAcrossThreads:yes|no]
[/ShowExternalCode:yes|no] [Thread:n] [index]

Arguments

index Optional. Sets the current stack frame and displays no output.

Switches

Each switch can be invoked using either its complete form or a short form.

/Count:number [or] /C:number Optional. Maximum number of call stacks to display. The default value is unlimited.

/ShowTypes:yes|no [or] /T:yes|no Optional. Specifies whether to display parameter types. Default value is yes.

/ShowNames:yes|no [or] /N:yes|no Optional. Specifies whether to display parameter names. Default value is yes.

/ShowValues:yes|no [or] /V:yes|no Optional. Specifies whether to display parameter values. Default value is yes.

/ShowModule:yes|no [or] /M:yes|no Optional. Specifies whether to display the module name. Default value is yes.

/ShowLineOffset:yes|no [or] /#:yes|no Optional. Specifies whether to display the line offset. Default value is no.

/ShowByteOffset:yes|no [or] /B:yes|no Optional. Specifies whether to display the byte offset. Default value is no.

/ShowLanguage:yes|no [or] /L:yes|no Optional. Specifies whether to display the language. Default value is no.

/IncludeCallsAcrossThreads:yes|no [or] /I:yes|no Optional. Specifies whether to include calls to or from other threads. Default value is no.

/ShowExternalCode:yes|no Optional. Specifies whether to display Just My Code for the callstack. When Just My Code is off, all non-user code is displayed. When Just My Code is on, non-user code is displayed as [external] in the callstack output.

Thread:n Optional. Displays the callstack for thread n. If no thread is specified, diplays the callstack for the current thread.

Remarks

Changes made to the arguments or switches apply to future invocations of this command. If you issue Debug.ListCallStackby itself, the entire call stack displays. If you specify an index, for example,

Debug.ListCallStack 2

then the current stack frame is set to that frame (in this case, the second frame).

You can also write this command using its pre-defined alias, kb. For example, you can enter

kb 2

to set the current stack frame to the second frame.

Example

>Debug.CallStack /Count:4 /ShowTypes:yes

See Also

List Disassembly Command List Threads Command Visual Studio Commands Command Window Find/Command Box Visual Studio Command Aliases