DLV-TEST(1)

πŸ’– DLV-TEST(1) πŸ’–

okay bestie, welcome to dlv-test β€” she's a General Commands Manual girlie and she's here to help you debug your tests. let's get into it πŸŽ€


✨ NAME ✨

dlv-test β€” compile test binary and begin debugging program. literally that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

dlv test [package] [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: dlv test compiles a test binary with optimizations disabled and begins a new debug session. no cap, that's her whole job.

The test command lets you begin a new debug session in the context of your unit tests. By default, Delve will debug the tests in the current directory. But bestie, you have options β€” alternatively you can specify a package name, and Delve will debug the tests in that package instead. iconic behavior honestly.

Double-dashes -- can be used to pass arguments to the test program:

dlv test [package] -- -test.run TestSomething -test.v -other-argument

See also: go help testflag. 🫢


πŸ‘‘ OPTIONS πŸ‘‘

  • -h, --help[=false] β€” help for test. she's here to help, that's it πŸ’–
  • --output="" β€” Output path for the binary. tell her where to put the goods ✨

🧚 OPTIONS INHERITED FROM PARENT COMMANDS 🧚

these are the family heirlooms, passed down from the parent command. obsessed.

  • --accept-multiclient[=false] β€” Allows a headless server to accept multiple client connections via JSON-RPC or DAP. the more the merrier fr fr πŸ’œ
  • --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. (two is the only one, periodt.)
  • --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. she's checking your ID at the door πŸšͺ
  • --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. stranger danger 🚫
  • -r, --redirect=[] β€” Specifies redirect rules for target process (see 'dlv help redirect')
  • --wd="" β€” Working directory for running the program.

🌈 SEE ALSO 🌈

  • dlv(1) β€” go say hi to the main character πŸ’«

and that's the whole page, bestie! auto generated by spf13/cobra back in Aug 2026, footer'd as DLV-TEST(1) β€” go forth and debug your tests, you absolute icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from