英文:
VSCode not hitting breakpoints using Go lang
问题
我正在使用Windows和最新的Visual Studio Code(v1.66.0),配合最新的"Go"扩展(v0.32.0),但我的断点似乎不再被触发。在调试过程中,断点从红色圆圈变为灰色,如果我将鼠标悬停在断点上,会显示"访问被拒绝"。我已尝试以管理员身份运行,但结果相同。Go模块是一个单独的文件,如截图所示。启动配置是由VSCode创建的默认配置,如下所示。有什么想法吗?
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
}
英文:
I'm using Windows and the latest Visual Studio Code (v1.66.0), with the latest "Go" extension (v0.32.0) and my breakpoints seem to no longer be getting hit. During debug, the breakpoint changes from a red circle to grey and if I hover over the breakpoint it displays "Access is denied". I've tried running as administrator with the same result. The Go module is a single file, as shown in the screenshot. The launch configuration is the default one created by VSCode, and is shown below. Any ideas?
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
}
答案1
得分: 1
给其他人提供信息,结果显示调试器“dlv.exe”被我的防病毒软件阻止了。
英文:
FYI for others searching, turns out that the debugger "dlv.exe" was being blocked by my antivirus software.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论