-2

How do I pass arguments to the debugged program when I invoke delve like this: dlv debug? I want to use dlv debug instead of dlv exec because dlv exec doesn't always find all sources.

Philippe
  • 1,715
  • 4
  • 25
  • 49

2 Answers2

1

Per dlv --help:

Pass flags to the program you are debugging using `--`, for example:

`dlv exec ./hello -- server --config conf/config.toml`
Adrian
  • 42,911
  • 6
  • 107
  • 99
1

One can pass arguments to dlv debug the same way you do with dlv exec. Eg.:

dlv debug -- -foo -bar

Philippe
  • 1,715
  • 4
  • 25
  • 49