-
Notifications
You must be signed in to change notification settings - Fork 797
debug: can't hit breakpoints when symlinks are involved #1458
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
Comments
Could you create a
|
Sorry for the late reply, here is the output:
|
Thanks for sharing the trace @SidKwok
From the environment variables, I think the current directory is the second, but the go command also sees the second directory path. But, the vscode is seeing the first directory path. By any chance, are you using symlinks? |
I think the answer is no, here is the output:
It doesn't seem to have any symlinks. But if the path is wrong, can we just simply change the path being used by vscode? Like a map or sth? |
Thanks @SidKwok The path is coming from the vscode. From the project directory (/home/quoxianlin/vimo_api) can you run |
Let's say if the entire /home is symlinked, what should be done to due with such situation? |
@hyangah Your guess is true!
|
@hyangah When I try to launch vscode from /data00/home/guoxianglin, everything works just fine! Thank you! But I would like to figure out that how to make it work when launching vscode from a symlink. Any solution on this? |
@SidKwok Thanks for confirming. Currently the recommendation is to use That doesn't currently work with 'debug test' codelenses though. Today we discussed this in our triage meeting and we are currently looking into solutions like:
|
Both solutions seem good to me. But personally I prefer the first one, because we can mark the true path using this flag. Let me know if there are any updates. Thanks everyone. |
Thanks! I filed a separate feature request #1467. |
What version of Go, VS Code & VS Code Go extension are you using?
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.The machine is own by our company, sorry that I can't provide all details here. But if you guys need anything specific, feel free to ask me to add more.
Share the Go related settings you have added/edited
None. Cuz I download the new VSCode, It has no other plugins except
Romote-SSH
andGo
Describe the bug
The breakpoints I add doesn't work at Remote-SSH, but work just fine in my local machine.
Steps to reproduce the behavior:
Add a break point at line 4:

Try to run the test file

The debug console runs just fine
But it doesn't hit the breakpoint I add at line 4
Same code, same enviorment, but when I run the debugger at my local machine(macos), it works just fine.

The text was updated successfully, but these errors were encountered: