Search code examples
debugginggovisual-studio-codedelve

How to pass boolean argument to delve in VS Code?


I am trying to pass argument to delve through VS Code but it doesn't work.

This is how to pass argument to a go program through delve:

dlv debug github.com/docker/swarm -- create

I tried many different solution in my launch.json:

"args": [
    "--",
    "create"
]
"args": [
    "--create"
]
"args": [
    "create"
]

Solution

  • After many attempts, I found the right one:

    "args": [
        "--create",
        "true"
    ]