DLV-EXEC(1)

πŸ’– dlv-exec β€” the manual page, but make it cute πŸ’–

okay so bestie, welcome to DLV-EXEC(1), from the General Commands Manual section of the universe. this is the page about dlv exec, and honestly? it's giving main character energy for your debugging era. let's get into it 🫢


✨ NAME ✨

dlv-exec β€” Execute a precompiled binary, and begin a debug session.

like. that's it. that's the whole vibe. you got a binary, you wanna poke at it, you run this. slay πŸ’…


🌸 SYNOPSIS 🌸

dlv exec  [flags]

two things: dlv exec, then your flags. nothing else. periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie: dlv exec executes a precompiled binary and starts a whole debug session. πŸŽ€

What actually happens is Delve goes "okay, I'm gonna exec that binary and immediately attach to it" and boom β€” new debug session, just like that. no cap.

⚠️ REAL TALK THOUGH: if your binary wasn't compiled with optimizations disabled, debugging it is lowkey gonna be a struggle. it's not impossible, it's just... messy. πŸ™ˆ

so the move is: compile your debugging binaries like this πŸ‘‡

for Go 1.10 or later:

-gcflags="all=-N -l"

for earlier versions of Go:

-gcflags="-N -l"

that's the whole thing. do that and you'll be fine, i promise. ✨


πŸ‘‘ OPTIONS πŸ‘‘

  • --continue[=false] β€” Continue the debugged process on start. default is false, so it does NOT do this unless you say so. if you want it running from the jump, flip it. πŸƒβ™€οΈ
  • -h, --help[=false] β€” help for exec. the classic. the icon. when in doubt, ask for help. default is false obviously. πŸ’€
  • --rr-cleanup[=true] β€” Delete directory containing debug recording on detach. default is true (yes bestie, it cleans up after itself, we love a tidy queen 🧹). note: this one's about the recording directory, not your whole life.
  • --tty="" β€” TTY to use for the target program. default is empty string "". set it if your target program needs a specific tty to live its truth. πŸ–₯️

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

these are the ones you get for free from the parent command, like hand-me-downs but actually good. ⭐

  • --accept-multiclient[=false] β€” Allows a headless server to accept multiple client connections via JSON-RPC or DAP. default false.
  • --allow-non-terminal-interactive[=false] β€” Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr. default false. iykyk.
  • --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. so uhh, don't try 3, there is no 3, 2 is the whole list. 😭
  • --backend="default" β€” Backend selection (see 'dlv help backend'). default is "default", which is very "default" of it.
  • --build-flags="" β€” Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v". default is empty, so nothing extra gets passed unless you pass it. πŸ› οΈ
  • --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. default true β€” it WILL exit on you if your Go and your Delve aren't matching energies. πŸ’€
  • --disable-aslr[=false] β€” Disables address space randomization. default false, so aslr is on unless you turn it off.
  • --headless[=false] β€” Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections. default false.
  • --init="" β€” Init file, executed by the terminal client. default "".
  • -l, --listen="127.0.0.1:0" β€” Debugging server listen address. Prefix with 'unix:' to use a unix domain socket. default is "127.0.0.1:0". πŸ“‘
  • --log[=false] β€” Enable debugging server logging. default false.
  • --log-dest="" β€” Writes logs to the specified file or file descriptor (see 'dlv help log'). default "".
  • --log-output="" β€” Comma separated list of components that should produce debug output (see 'dlv help log'). default "". yes, comma separated. don't use spaces, bestie. πŸ“
  • --only-same-user[=true] β€” Only connections from the same user that started this instance of Delve are allowed to connect. default true, and honestly thank god, that's the safe default. πŸ”’
  • -r, --redirect=[] β€” Specifies redirect rules for target process (see 'dlv help redirect'). default is an empty list [].
  • --wd="" β€” Working directory for running the program. default "".

πŸŽ€ SEE ALSO πŸŽ€

go read that one too, it's the parent, it raised this whole family. πŸ’œ


okay so that's the page!! you are now officially informed, educated, and a little bit slayed. go debug something iconic. πŸ‘‘

this page was auto generated by spf13/cobra, dated Aug 2026, and it's from the DLV-EXEC(1) era of your life. bye bestie, love u, don't forget the -gcflags βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from