VScode 调试模式找不到我的 config.json 文件
我正在尝试在 VScode 上调试 go 应用程序,但找不到我的 config.json。我在读取配置时遇到错误。恐慌:打开config.json:系统找不到指定的文件
错误。
这是我的 launch.json 文件,我将工作区路径设置为 src,这是我的 go 文件和主包的位置。
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceRoot}\\src"
}
]
}```
The config.go file is a level higher than the src folder. I have attached a screenshot of my workspace structure. What am I doing wrong?
[![screenshot of my workspace structure][1]][1]
[1]: https://i.sstatic.net/mz4KL.png
I am trying to debug a go application on VScode, but my config.json can't be found. I am getting a Error occurred while reading config. panic: open config.json: The system cannot find the file specified
error.
This is my launch.json file and I have my workspace path set to the src, which is where I have my go files and main package.
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceRoot}\\src"
}
]
}```
The config.go file is a level higher than the src folder. I have attached a screenshot of my workspace structure. What am I doing wrong?
[![screenshot of my workspace structure][1]][1]
[1]: https://i.sstatic.net/mz4KL.png
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个配置
Try this config