go - 尝试在测试模式下在 VSCode 调试器上调试 golang 时出现奇怪的错误
问题描述
我正在Debug
按下按钮VSCode
具有以下配置
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceRoot}",
"env": {
"VAR1": "admin",
"VAR2": "supersecretpassword",
"VAR3": "doesnotmatter_1",
"VAR3": "doesnotmatter_2",
},
},
{
"name": "Test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceRoot}",
"env": {
"VAR1": "admin",
"VAR2": "supersecretpassword",
"VAR3": "doesnotmatter_1",
"VAR4": "doesnotmatter_2",
},
}
]
}
(我正在选择Test
模式
我一生中第一次收到以下错误:
启动失败:无法启动进程:打开/Users/pantelis/Workspace/eck-user-mgmt/__debug_bin:没有这样的文件或目录
我很确定我最多在几天前运行这个过程。
有任何想法吗?
(选择Debug
模式时,该过程似乎按预期工作)
编辑1:我将Test
配置更改为以下
"name": "Test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceRoot}",
"env": {
"VAR1": "admin",
"VAR2": "supersecretpassword",
"VAR3": "doesnotmatter_1",
"VAR4": "doesnotmatter_2",
"trace": "verbose",
"showLog": true,
"logOutput": "dap",
},
}
它仍然失败但没有特别的错误(或DEBUG CONSOLE
输出视图中的额外信息
解决方案
推荐阅读
- python - 如何遍历列表数组,检查每个列表中的元素并与值进行比较,如果它与值匹配则返回键
- javascript -
不适用于新创建的列表项 - python - GTK 无法从条形码扫描仪设备接收键盘输入
- sql-server - 无法在 Powershell 中安装 SQLServer 模块
- java - Hibernate 搜索 - 首先完全匹配
- sql - 从输入的日期时间集中选择日期时间最近的行
- javascript - 为什么所有属性都未定义的对象未列为空?
- html - Bootstrap 4 导航栏错误
- powershell - 在嵌套文件夹中调用 Powershell 脚本
- symfony - 如何使用学说(Symfony 4)将数据存储在数组集合中?