英文:
vscode ssh develop Go cannot stop at breakpoint when code under /home/{username}/ floder
问题
我有远程开发的问题。我想请教一些解决这个问题的建议。
尝试过的方法:
- 我认为可能是权限的问题。所以我运行了
sudo chmod 777 ~/code
,但没有起作用。
英文:
I have the remote develop problem. I want to ask for some advices to solve this problem.
-
when my code under
~/
floder, debug cannot stop at breakpoints:
-
I tried to debug C file under
~/
floder, no problem, can stop at breakpoint
Tried:
- I think if it is because of permission. so I run
sudo chmod 777 ~/code
, but not work.
答案1
得分: 1
请检查项目设置中是否没有符号链接,就像我在这里提到的那样。
对于Mac,请确保go env中不包含(如问题2807中所述)GOFLAGS="-trimpath"
解决方案是在launch.json
中添加以下内容:
remotePath": "/myapp/"
英文:
Check if, as I mentioned here, there is no symlink in the project settings.
For mac, make sure go env does not include (as in issue 2807), GOFLAGS="-trimpath"
> The solution would be to add to your launch.json
>
> remotePath": "/myapp/"
答案2
得分: 0
感谢JetBrains-ssh-goland。我知道为什么我的远程Linux无法使用VSCode进行调试。
我的~
路径是软链接到/data00
路径。所以VSCode找不到~/
下的文件。
但是goland可以找到它,我从goland复制的绝对路径如下:
我现在不知道软链接是什么,但我会找出来的 (╥﹏╥)
谢谢。
英文:
thanks for JetBrains-ssh-goland. I know why my remote linux cannot debug using vscode.
my ~
path is soft link to /data00
path. so vscode cannot find file under ~/
.
But goland can find it and the absolute path I copied from goland is below:
I don't know what is soft link right now, but I will find it out (╥﹏╥)
thanks.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论