-
Notifications
You must be signed in to change notification settings - Fork 645
Error on CreateBreakpoint: could not find file (macOS) when using trimpath in GOFLAGS #2807
Comments
For example, given the project:
|
Are you using symlinks? |
No. It happens even with brand new projects. |
If I try to run the command via
But if I use a relative file path from the root of the project, it works perfectly:
Should it really be using full paths? |
OK, so I figured out what is going wrong here: I have I wouldn't have thought that would make a difference, but since VSCode is using the full (absolute) path to files, that is where the issue lies. The binary does not have a full filepath, only relative paths from the root of the project. (That might also explain why it won't work with symlinks) So is there a specific reason for using full absolute paths? Couldn't we use relative paths? |
Here https://github.com/bazelbuild/rules_go/issues/1844 men bump into similar conclusion |
Hi, Here are open issues : #2010 and bazel-contrib/rules_go#1844 I also getting the same problem on MacOS 10.14.6, In my case I don't use GOFLAGS="-trimpath". VSCode with launch.json
also gives Docker container with headless delve-server running on 127.0.0.1:2345
Any updates on this topic @ramya-rao-a ? |
@jorng What if instead of |
@vshkola, I think you are not specifying the path mapping correctly. |
There are two different issues being discussed here.
I'll update the issue title to reflect the @jorng, @quoctruong, Passing relative path to See https://github.com/microsoft/vscode-go/blob/0.11.9/src/debugAdapter/goDebug.ts#L347-L368 and https://github.com/microsoft/vscode-go/blob/0.11.9/src/debugAdapter/goDebug.ts#L381-L385 and https://github.com/microsoft/vscode-go/blob/0.11.9/src/debugAdapter/goDebug.ts#L440 Folks are welcome to investigate what work is needed to support relative paths to the |
Case when remotePath is not configured properly which is what is the case is for @vshkola Hello, I had the exact same problem with @vshkola and what helped me was to set the remote path as follows: |
@jorng This is now fixed in the nightly Go build (https://github.com/golang/vscode-go). Please give it a try: https://github.com/golang/vscode-go/blob/master/docs/nightly.md |
Please follow the discussion on golang#45 or file a new issue if this still isn't working for you. |
Unable to set any breakpoints in any files.
Using go1.13.1, modules on. Even with basic “Hello world”. No matter what, I see the error in the title, followed by a full path to my main.go.
The text was updated successfully, but these errors were encountered: