Sam*_*ies 8 testing debugging go visual-studio-code
调试测试可以完美工作,但最近某个时候发生了一些变化,现在却没有(也许是 go 版本升级?)。
当我单击“调试测试”时,会弹出此错误消息:
错误是:Failed to launch: invalid debug configuration - cannot unmarshal bool into "env" of type string
我的launch.json
看起来不错(同样,这曾经完美地工作过):
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch test function",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}",
"env": {
"LOG_LEVEL": "debug",
"LOG_SQL": "false",
"DATABASE_URL": "postgresql://postgres@localhost:5432/chainlink_test?sslmode=disable",
},
"args": ["-v"]
},
]
Run Code Online (Sandbox Code Playgroud)
}
可能出什么问题了?
只是猜测,但这是否是因为 \xe2\x80\x9cLOG_SQL\xe2\x80\x9d 是 \xe2\x80\x9cfalse\xe2\x80\x9d 而不是 false (字符串 vs bool),而它\xe2\x80\x99s尝试将 \xe2\x80\x9cfalse\xe2\x80\x9d 解析为 bool。
\n 归档时间: |
|
查看次数: |
2965 次 |
最近记录: |