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

Add toggle for deemphasized code #1916

Closed
ansiwen opened this issue Nov 28, 2021 · 5 comments
Closed

Add toggle for deemphasized code #1916

ansiwen opened this issue Nov 28, 2021 · 5 comments
Assignees
Labels
Debug Issues related to the debugging functionality of the extension. FeatureRequest FrozenDueToAge
Milestone

Comments

@ansiwen
Copy link

ansiwen commented Nov 28, 2021

Is your feature request related to a problem? Please describe.
Since go-delve/delve#2522 stack frames in runtime have the "deemphasize" presentation hint. This results in vscode to always jump out of the runtime stack frames while stepping through runtime code. Especially when debugging runtime changes this is not usable and requires to switch back to the legacy debug adapter.

Describe the solution you'd like
There needs to be a possibility to ignore the presentation hint globally, or to toggle it per debugging session/frame by right clicking on the stack frame and toggle it similar to Toggle skipping this file. Alternatively, similar to these skipping rules, setting a breakpoint in runtime code could/should disable the deemphasizing.

@gopherbot gopherbot added this to the Untriaged milestone Nov 28, 2021
@hyangah
Copy link
Contributor

hyangah commented Nov 29, 2021

@suzmue @polinasok
Related: should this functionality be somehow combined with the new HideSystemGoroutines feature?

@hyangah hyangah added the Debug Issues related to the debugging functionality of the extension. label Nov 29, 2021
@hyangah hyangah modified the milestones: Untriaged, Unplanned Nov 29, 2021
@suzmue
Copy link
Contributor

suzmue commented Nov 29, 2021

@ansiwen Thanks for the feedback.

After seeing this feature in use for a while, I think we should consider removing the source presentation hint all together. It would still be possible to provide a visual indication of runtime vs source stack frames, without deemphasizing the source.

This is what it currently looks like (source.presentationHint="deemphasize"):
Screen Shot 2021-11-29 at 11 11 30 AM

If we move the presentation hint 'subtle' to the stack frame instead of the source, we can instead have the following (presentationHint="subtle"):
Screen Shot 2021-11-29 at 11 10 55 AM

Or of course we could remove the presentation hints all together, or just put this behind a configurable option.

@polinasok
Copy link
Contributor

I think using subtle to visible differentiate user and runtime frames is a good idea.. We could also collapse only the frames at the bottom of the stack.

Is there such thing as too many configurable launch options? It is does seem more intuitive for the user if these things were evaluated on the fly dynamically - i.e. sticky expansions. It would have been good to combine hiding system frames and goroutines into one option. Too late now? We have released it already, haven't we?

@polinasok
Copy link
Contributor

We had a discussion offline and all are in agreement that we don't need to collapsing can be removed in favor of subtle.
The option to hide goroutines has not been released beyond Nightly. We could nest it under some kind of visibility config like viewConfig, so all options to hide/show things in the UI are grouped together. But that's beyond the scope of this issue.

@hyangah
Copy link
Contributor

hyangah commented Dec 4, 2021

@ansiwen go-delve/delve#2810 was merged and available from the head. Please update dlv-dap ("Go: Install/Update Tools"). Thanks!

@hyangah hyangah closed this as completed Dec 4, 2021
@hyangah hyangah modified the milestones: On Deck, v0.30.0 Dec 10, 2021
@golang golang locked and limited conversation to collaborators Dec 10, 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. FeatureRequest FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

5 participants