Facing an Issue with Vscode Debugger on WSL #2009
Replies: 1 comment
-
Thank you so much for sharing the detailed debug log and all the settings! The root cause is the difference between the file paths the go compiler sees and the file paths the editor sees. VS Code resolved It's likely the go tool chain also used the same path (not guaranteed though because go tool chain's behavior around symlinks or aliased paths is undefined by nature) when generating the debug information. The editor however sent breakpoint requests with the file paths that look like: As a result, the debugger couldn't find the location info of the requested breakpoints and reported the errors:
The error messages should be shown in the breakpoint viewlet but as discussed in #1840 and #1999, VS Code clears out the error information as soon as the debug session ends, so users often don't have a chance to recognize the issue. You can consider In general, when working with WSL, VSCode recommends to set up the environment using their WSL extension (https://code.visualstudio.com/docs/remote/wsl). The Go tool chain's behavior around WSL mounted folders or symlinks is not well-defined either and we've observed a few issues like golang/go#49475 so we also recommend the VSCode's best-practice. |
Beta Was this translation helpful? Give feedback.
-
Trace
Not sure what to do
Beta Was this translation helpful? Give feedback.
All reactions