如何在VS Code中将布尔参数传递给Delve?

7

我正在尝试通过VS Code将参数传递给delve,但它无法工作。

以下是通过delve向go程序传递参数的方法:

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

在我的 launch.json 文件中,我尝试了许多不同的解决方案:

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

"args": [
    "--create"
]

"args": [
    "create"
]
1个回答

7

经过多次尝试,我找到了正确的方法:

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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接