-
Notifications
You must be signed in to change notification settings - Fork 816
Closed
Labels
Milestone
Description
Is your feature request related to a problem? Please describe.
I spend a few days pulling my hair out why debugging was not working via "run test | debug test", while the launch configuration did work fine. Long story short, this was my settings.json:
"go.testFlags": [
"-trimpath",
"-v"
],
This results in file paths like /Users/hermanbanken/repos/myrepo/foobar.go:42
be rewritten to github.com/hermanbanken/myrepo/foobar.go:42
. This is nice for brevity, but breaks:
- File Links (clicking the link in the terminal and jumping to the exact line)
- Debugging via
run test | debug test
because breakpoints reference absolute paths, and those do not match whatdlv
reports.
Describe the solution you'd like
A combination of any of these options:
- Warnings when
-trimpath
is used intestFlags
settings - Support for module paths in VSCode File Links (is this this extension?)
- Support for dlv paths being module paths (is this this extension?)
Describe alternatives you've considered
For now I removed -trimpath
and my debugging flow works again.
Related to microsoft/vscode-go#1935.