cmd,Documentation: Add some simple examples for the list command to the help (#2034)

This commit is contained in:
colinnewell
2020-05-04 17:27:55 +01:00
committed by GitHub
parent 2f295f310d
commit 99a0468b9b
2 changed files with 15 additions and 1 deletions

View File

@ -348,6 +348,13 @@ Show source code.
Show source around current point or provided linespec.
For example:
frame 1 list 69
list testvariables.go:10000
list main.main:30
list 40
Aliases: ls l
## locals

View File

@ -263,7 +263,14 @@ When connected to a headless instance started with the --accept-multiclient, pas
[goroutine <n>] [frame <m>] list [<linespec>]
Show source around current point or provided linespec.`},
Show source around current point or provided linespec.
For example:
frame 1 list 69
list testvariables.go:10000
list main.main:30
list 40`},
{aliases: []string{"stack", "bt"}, allowedPrefixes: onPrefix, group: stackCmds, cmdFn: stackCommand, helpMsg: `Print stack trace.
[goroutine <n>] [frame <m>] stack [<depth>] [-full] [-offsets] [-defer] [-a <n>] [-adepth <depth>] [-mode <mode>]