Comments (10)
This is side comment that might help someone. Documentation regarding path mapping is not explaining clearly how to set it up and how it works. I had to investigate code and that allowed me to understand two things:
remotePath
keyword is misleading, because it's path to sources during executable build. Even if you move sources, then you must provide original one (I think they are compiled in), so for me name likeoriginalBuildPath
would be more clear.- local path setup - this is actually path obtained from
cwd
, but I would prefer setting something likelocalPath
explicitly.
from vscode-go.
Change https://golang.org/cl/234020 mentions this issue: Add logic to infer remote path automatically
from vscode-go.
Does running ListPackagesBuildInfo
involve discovering go packages, and thus running 'go list' on remote side? If so, getting this information can be pretty expensive.
In loaded IDE, we can know folders paths from opened project metadata, along with GOPATH and GOROOT. In 99.(9)% of the cases this is enough to match the remote file with the local one.
One concern that I have is that getting a list of all source paths from remote may be expensive.
from vscode-go.
Change https://golang.org/cl/236017 mentions this issue: src/debugAdapter/goDebug: add extra check for remote path inference
from vscode-go.
BTW, is it possible for users to offer a delve configuration with explicit path mapping info currently?
from vscode-go.
Yes, for now, but there is talk of taking out that option once this one is stable. The problem is that a single path option can only point to either user's source code or 3rd party library in a different directory, but not both.
from vscode-go.
@polinasok Maybe my question was not specific. I am asking if users can supply config.yml
that supports multiple path substitution.
from vscode-go.
@koxu1996 - Thank you! I spent far too long trying to get breakpoints to work during a remote debug session between vscode on windows and delv in an ubuntu docker. Setting remotePath
to the go workspace directory the binary was built from (even though it had no relation to the windows machine) and then setting cwd
to ${workspaceFolder}
, and everything worked.
It would be awesome if the vscode-go extension could just try remapping whatever paths are in the binary on the remote machine to the currently opened ${workspaceFolder}
, as it seems like the most likely case.
https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging is also out of date and still mentions using program
instead of cwd
, among other things.
from vscode-go.
Change https://golang.org/cl/253741 mentions this issue: docs/debugging.md: update remote debugging documentation
from vscode-go.
We updated the section for remote debugging. Please review and if you find it's still unclear and needs improvement, please file a new issue or submit your PRs.
from vscode-go.
Related Issues (20)
- gopls: automated issue report (crash) HOT 2
- delve: config output debug binary in setting.json HOT 1
- Add a configuration item named "args" to pass arguments to dlv debug test binary.
- gopls: automated issue report (crash) HOT 1
- ejhgcblcifncunvevdtidchtleccbtbnbfrehdbnldbkgopls: automated issue report (crash) HOT 1
- Go test profiling: run test with race detector HOT 1
- Warning of missing fields when using build constraints HOT 2
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 1
- gopls: panic with invalid Go version HOT 5
- gopls: nil panic in ClearModuleInfo HOT 1
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 2
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (initialization) HOT 2
- gopls: automated issue report (crash) HOT 2
- gopls: automated issue report (crash) HOT 2
- gopls: automated issue report (crash) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-go.