-
Notifications
You must be signed in to change notification settings - Fork 906
go.testFlags doesn't pass items before -args to debug binaries #1636
Copy link
Copy link
Closed
Labels
DebugIssues related to the debugging functionality of the extension.Issues related to the debugging functionality of the extension.FrozenDueToAgeGo CompanionIssues relating to the Go Companion extensionIssues relating to the Go Companion extensionNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.debug/configIssues for config discrepancies b/n settings.json, launch.json, launch with F5, run test, debug testIssues for config discrepancies b/n settings.json, launch.json, launch with F5, run test, debug test
Milestone
Metadata
Metadata
Assignees
Labels
DebugIssues related to the debugging functionality of the extension.Issues related to the debugging functionality of the extension.FrozenDueToAgeGo CompanionIssues relating to the Go Companion extensionIssues relating to the Go Companion extensionNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.debug/configIssues for config discrepancies b/n settings.json, launch.json, launch with F5, run test, debug testIssues for config discrepancies b/n settings.json, launch.json, launch with F5, run test, debug test
Type
Fields
Give feedbackNo fields configured for issues without a type.
What version of Go, VS Code & VS Code Go extension are you using?
go versionto get version of Go from the VS Code integrated terminal.go version go1.16.6 linux/amd64gopls -v versionto get version of Gopls from the VS Code integrated terminal.golang.org/x/tools/gopls v0.7.0code -vorcode-insiders -vto get version of VS Code or VS Code Insiders.1.58.2 c3f126316369cd610563c75b1b1725e0679adfb3 x640.26.0Go: Locate Configured Go Toolscommand.Checking configured tools....
Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)command to open your settings.json file.Share all the settings with the
go.or["go"]orgoplsprefixes.Details
Describe the bug
This is basically a re-hash / follow-up to old issue microsoft/vscode-go#2115
If you set
go.testFlagsto["-v"], then you get verbose test output when running tests but not debugging them. If you set it to["-args","-test.v"]then you get verbose output when debugging but not when running. You have to combine the two via["-v", "-args", "-test.v"]to get both behaviors.This is quite confusing. It seems that
testFlagselements before-argsought to be passed to the debug binary with thetest.prefix added, the same waygo testdoes when non-debug running tests.Steps to reproduce the behavior:
go.testFlagsto["-v"]ps auxww | grep testor such to see the running processes, observe that the test is run as/path/to/something.test -run ^TestName$, instead of as/path/to/something.test -run ^TestName$ -test.v