DLV-TRACE(1)

πŸ’« dlv-trace β€” the tea β˜•

okay bestie, welcome to dlv-trace πŸ’– it's a page from the general commands manual, and it's about to be your new fave. no cap.


✨ NAME ✨

dlv-trace β€” compile and begin tracing your program. that's it, that's the vibe 🌸


✨ SYNOPSIS ✨

dlv trace [package] regexp [flags]

✨ DESCRIPTION ✨

so basically: trace program execution. πŸ¦‹

the trace sub command will set a tracepoint on every function matching the regex you hand it, and then it prints out info every single time that tracepoint gets hit. it's giving "I don't need a whole debug session, I just wanna know what my process is doing" energy. literally perfect when you don't want to begin an entire debug session but merely want to know what functions your process is executing. πŸ‘‘

also important: the output of the trace sub command is printed to stderr, so if you'd like to only see the output of the trace operations, you can just redirect stdout. πŸ’…


✨ OPTIONS ✨

  • --ebpf[=false] β€” trace using eBPF. it's experimental, so like… handle with care πŸ™ˆ
  • -e, --exec="" β€” binary file to exec and trace.
  • --follow-calls=0 β€” trace all children of the function to the required depth. trace also supports defer functions and cases where functions are dynamically returned and passed as parameters. so thorough, we're obsessed 🫢
  • -h, --help[=false] β€” help for trace.
  • --output="" β€” output path for the binary.
  • -p, --pid=0 β€” pid to attach to.
  • -s, --stack=0 β€” show stack trace with given depth. (ignored with --ebpf β€” yeah, that combo's not a thing)
  • -t, --test[=false] β€” trace a test binary.
  • --timestamp[=false] β€” show timestamp in the output.
  • -v, --verbose=0 β€” parameter verbosity: 0=values, 1=types, 2=inline, 3=expanded, 4=full (default 0)

✨ OPTIONS INHERITED FROM PARENT COMMANDS ✨

yes bestie, it inherited these from its parent commands, and we are NOT skipping a single one πŸ’œ

  • --accept-multiclient[=false] β€” allows a headless server to accept multiple client connections via JSON-RPC or DAP.
  • --allow-non-terminal-interactive[=false] β€” allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr.
  • --api-version=2 β€” selects JSON-RPC API version when headless. the only valid value is 2. can be reset via RPCServer.SetApiVersion. see Documentation/api/json-rpc/README.md.
  • --backend="default" β€” backend selection (see 'dlv help backend').
  • --build-flags="" β€” build flags, to be passed to the compiler. for example: --build-flags="-tags=integration -mod=vendor -cover -v"
  • --check-go-version[=true] β€” exits if the version of Go in use is not compatible (too old or too new) with the version of Delve.
  • --disable-aslr[=false] β€” disables address space randomization.
  • --headless[=false] β€” run debug server only, in headless mode. server will accept both JSON-RPC or DAP client connections.
  • --init="" β€” init file, executed by the terminal client.
  • -l, --listen="127.0.0.1:0" β€” debugging server listen address. prefix with 'unix:' to use a unix domain socket.
  • --log[=false] β€” enable debugging server logging.
  • --log-dest="" β€” writes logs to the specified file or file descriptor (see 'dlv help log').
  • --log-output="" β€” comma separated list of components that should produce debug output (see 'dlv help log').
  • --only-same-user[=true] β€” only connections from the same user that started this instance of Delve are allowed to connect.
  • -r, --redirect=[] β€” specifies redirect rules for target process (see 'dlv help redirect').
  • --wd="" β€” working directory for running the program.
🚨 friendly reminder: the inherited --check-go-version defaults to true, and if your Go is too old or too new for your Delve, it exits. so keep your versions in a situationship that works. πŸ”₯

✨ SEE ALSO ✨


and that's the whole page, bestie, you ate it πŸŽ€ stan a tracepoint, fr fr. periodt. πŸ’–βœ¨

this one's auto generated by spf13/cobra, dated August 2026 β€” yes, the future, iconic behavior, no notes. πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from