-
Notifications
You must be signed in to change notification settings - Fork 761
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
Debugger when attached to a running process is using wrong file paths for some files #3537
Comments
Thanks for reaching out @cthumuluru
Can you please tell us more about how you built the debugged binary? And, can you query the problematic source files's paths recorded in the binary from the To run this |
Hello @hyangah -- sorry for the delayed response. The project I'm working on uses Bazel for build. If you are asking about the compiler options uses to compile, they are Here is the output from
|
Hi @hyangah, please let me know if you need any additional information. |
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.go version go1.22.5 linux/amd64
Run
gopls -v version
to get version of Gopls from the VS Code integrated terminal.Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.v0.42.1
Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Tools
command.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
VSCode debugger uses wrong paths for some files during remote attach debug session. This only happens with few files. Debugger some how assumes the file path is
pkg/rpc/pkg/rpc/context.go
while the actual file path ispkg/rpc/context.go
and it fails to locate the file.Steps to reproduce the behavior:
I'm not sure if there is an easy way to reproduce this but I can provide additional information as needed. Sharing launch.json file contents here:
Screenshots or recordings
pkg/server/tenant.go
where it works as expected:pkg/rpc/context.go
where it doesn't work as expected:The text was updated successfully, but these errors were encountered: