-
Notifications
You must be signed in to change notification settings - Fork 770
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
Improve automated path mapping in dlv debug adapter #3193
Comments
-> related? #3096 |
@suzmue Things seem complicated if Windows or case-insensitive OS is involved, since VS Code (DAP client) uses the absolute file paths instead of file uri or relative paths. In this case, I think we need more than Delve's |
Can you please elaborate on this? Does delve need to support the I would like to help implement this, but am looking for some more context. (I suppose the legacy implementation is not possible with DAP? As far as I understand it, the legacy implementation sends the |
Change https://go.dev/cl/643280 mentions this issue: |
Is your feature request related to a problem? Please describe.
The legacy debug adapter implemented some support for automatic path mapping (#45). We want to deprecate the legacy debug adapter so should provide some automatic path mapping, which will likely take a different form than the legacy.
dlv dap uses the
substitutePath
setting in the launch.json attributes to configure mappings when the local and debugger paths do not match (such as with symlinked dirs, remote debugging, trimpath).A lot of times users don’t know that they have to provide path mapping for the breakpoints to hit. Even if they do, they don’t provide the correct path mappings. So what happens is that the debugger appears to be running but no breakpoints are hit. This can cause a lot of confusion to the users.
Describe the solution you'd like
We can use the local configuration of the main modules, module cache, and GOROOT, to help automate this configuration.
This will need implementation work in github.com/go-delve/delve to do the mapping and modifications to the extension to provide the necessary data from the client.
Additional context
Related issues include #3175, #45
The text was updated successfully, but these errors were encountered: