-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug golang project, breakpoint is invalid #3447
Comments
@Jerry-yz thanks for reaching out. I cannot reproduce it myself. Can you capture the log and share it with us? Here is the instruction: And, please let us know how exactly you launched the debug session - pressing F5? or clicking "Run and Debug" button in the debug view, or having launch.json? |
this is my launch.json: |
i edit launch.json: |
That is strange. Then, if line 14 is indeed
The launch request I am running out of ideas and cannot reproduce. Can you try if dlv command line tool works?
Does it work for you? |
it not workl: |
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command."debug.allowBreakpointsEverywhere": true,
"go.alternateTools": {}
}>
Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.
Steps to reproduce the behavior:
Steps to Reproduce:
breakpoint main.go line fmt.Println(i), it invalid
func main() {
for i := 0; i < 10; i++ {
fmt.Println(i)
}
}
2.terminal immediate output
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: