You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 what dlv reports.
Describe the solution you'd like
A combination of any of these options:
Warnings when -trimpath is used in testFlags 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.
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:
This results in file paths like
/Users/hermanbanken/repos/myrepo/foobar.go:42
be rewritten github.com/hermanbanken/myrepo/foobar.go:42
. This is nice for brevity, but breaks: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:
-trimpath
is used intestFlags
settingsDescribe alternatives you've considered
For now I removed
-trimpath
and my debugging flow works again.Related to microsoft/vscode-go#1935.
The text was updated successfully, but these errors were encountered: