Skip to content
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

configure dlvFlags when running tests #1723

Closed
snigle opened this issue Aug 26, 2021 · 4 comments
Closed

configure dlvFlags when running tests #1723

snigle opened this issue Aug 26, 2021 · 4 comments
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@snigle
Copy link

snigle commented Aug 26, 2021

Is your feature request related to a problem? Please describe.
In my dev environment I need to pass some flags to dlv-dap to works. It's works when running a package main with dlvFlags option in launch config. But when I want to debug the test execution, I would like to configure it here also.

Describe the solution you'd like
A settings go.testDlvFlags : [] to add in the debug test config :
https://github.com/golang/vscode-go/blob/master/src/goTest.ts#L228$

Describe alternatives you've considered
In workaround I will create a binary of dlv-dap to set my flags by default

@gopherbot gopherbot added this to the Untriaged milestone Aug 26, 2021
@hyangah
Copy link
Contributor

hyangah commented Aug 26, 2021

I think having proper debug settings (e.g. go.debug.delveFlags, go.debug.substitutePath, go.debug.logOutput, ... ) to override the default, or extending the existing go.delveConfig to accept some launch config can be an alternative to #855

@polinasok @suzmue

@hyangah hyangah added Debug Issues related to the debugging functionality of the extension. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 26, 2021
@hyangah hyangah modified the milestones: Untriaged, On Deck Aug 26, 2021
@polinasok
Copy link
Contributor

I think having proper debug settings (e.g. go.debug.delveFlags, go.debug.substitutePath, go.debug.logOutput, ... ) to override the default, or extending the existing go.delveConfig to accept some launch config can be an alternative to #855

So in other words, you propose that we put many of the flags available in launch.json into settings.json (global vs workspace-specific)? Then users could specify most settings things there and override in launch.json for individual sessions?

This could be powerful, but also add more confusion. Right now when you mouse-over a field in launch.json, it shows the defaults from package.json. Would it be possible to somehow channel the true defaults from settings.json in that hover or in some other way? Or maybe we need to invest in logging both configurations with a clear this-overrides-that presentation on start-up to make clear to the users.

@hyangah
Copy link
Contributor

hyangah commented Sep 3, 2021

I think having proper debug settings (e.g. go.debug.delveFlags, go.debug.substitutePath, go.debug.logOutput, ... ) to override the default, or extending the existing go.delveConfig to accept some launch config can be an alternative to #855

So in other words, you propose that we put many of the flags available in launch.json into settings.json (global vs workspace-specific)? Then users could specify most settings things there and override in launch.json for individual sessions?

Not all the settings from launch.json. Only those that make sense to apply to all launch.json. go.delveConfig already set a precedent and it seems like users used it without much confusion for a long period of time.

Channeling the true defaults from settings.json is not possible as far as I know since the UI + intellisense over launch.json is done completely outside of the extension. Maybe we can log more to make it clear if that helps.

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/351249 mentions this issue: package.json: add showLog/logOutput/dlvFlags to go.delveConfig setting

@golang golang locked and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants