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

debug: gcflags set by user should be ignored when debugging #117

Closed
ramya-rao-a opened this issue May 28, 2020 · 6 comments
Closed

debug: gcflags set by user should be ignored when debugging #117

ramya-rao-a opened this issue May 28, 2020 · 6 comments
Assignees
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 28, 2020

As described in microsoft/vscode-go#2415, gcflags set by the user interferes with debugging. This issue is to have the extension ignore this setting when debugging.

While microsoft/vscode-go#2415 is about debugging tests, this may apply to normal debugging as well

@stamblerre stamblerre changed the title gcflags set by user should be ignored when debugging debug: gcflags set by user should be ignored when debugging Jun 3, 2020
@stamblerre
Copy link
Contributor

@hyangah: How do you feel about this? I am nervous the ignore any user-set flags, and would maybe prefer to surface an error message.

@stamblerre stamblerre added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Debug Issues related to the debugging functionality of the extension. labels Jun 3, 2020
@ramya-rao-a
Copy link
Contributor Author

This would be similar to the other issue where we have user set GOOS and GOARCH. Basically user settings that would mess with delve

@hyangah
Copy link
Contributor

hyangah commented Oct 26, 2020

Removing gcflags, GOOS, GOARCH when launching through debugger makes sense. We will do it.
To avoid user confusion, we need to notify users of this modification when those conflicting settings are detected.

/cc @suzmue @polinasok

@suzmue also questioned whether we should apply similar changes on GOOS/GOARCH when running tests.

@hyangah hyangah added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 26, 2020
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/265580 mentions this issue: src/goDebugConfiguration: remove user set '--gcflags' from config

@szmcdull
Copy link

szmcdull commented Aug 19, 2021

Hi, I need -gcflags='-G=3' to enable generics. But seems vscode cannot do this. Neither gopls nor dlv-dap is using the gcflags and they all complain about grammar error which is valid when generics is enabled

@polinasok
Copy link
Contributor

@szmcdull If you want dlv to build things for you, then it will supply its own gcflags. If you prefer to customize those, then you can build the binary directly and let dlv/vscode execute it with exec mode.

@golang golang locked and limited conversation to collaborators Aug 24, 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 NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

7 participants