13

I would like to pass arguments to the binary file when executing it with dlv

dlv --listen=:5432 exec /mypath/binary --config=config.toml

But when I am doing it I get following error:

Error: unknown flag: --config

How can I pass arguments to binary when using dlv debugger?

Rudziankoŭ
  • 10,681
  • 20
  • 92
  • 192

1 Answers1

28

Add -- to tell dlv that all subsequent arguments should be passed verbatim to the binary, without trying to parse them:

dlv --listen=:5432 exec /mypath/binary -- --config=config.toml

See Delve - Getting Started.