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 boolean suppression DebugSessionOptions #12220

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

sgraband
Copy link
Contributor

What it does

Add options to suppress the debugging statusbar, toolbar and view.
As well as the saving before starting a debugging session.

Fixes #12015

Contributed on behalf of STMicroelectronics

Note:
Parent/child sessions are currently handled as followed:

  • For the saving supression only the root session is taken into account as this could have unintended side effects (saving files when not wanted), if a child session specifies something else than the parent session.
  • For the other three supressions (debug view, toolbar and statusbar) the value of the current session is evaluated. If there is no value the nearest parent session will be evaluated.

I mostly went with two different approaches here due to the significance of the actions (saving vs graphical-only), but your input is welcome and i will gladly unify the approaches, when the "better" solution is identified.

How to test

  • Install this extension: helloworld-sample-0.0.1.zip
    It registers a few commands that start the "Launch Browser Backend" debug config with different options set.
  • Open theia and the theia repository as the workspace.
  • Add the following to your setting.json file:

"debug.saveBeforeStart": "allEditorsInActiveGroup",
"debug.openDebug": "openOnSessionStart",
"files.autoSave": "off",

  • Trigger one of the Start Debugging commands. It says in parenthesis which options are enabled.
  • See if the behavior is correct:

suppressDebugStatusbar?: boolean
When true, the window statusbar color will not be changed for this session.

suppressDebugToolbar?: boolean
When true, the debug toolbar will not be shown for this session.

suppressDebugView?: boolean
When true, the debug viewlet will not be automatically revealed for this session.

suppressSaveBeforeStart?: boolean
When true, a save will not be triggered for open editors when starting a debug session, regardless of the value of the debug.saveBeforeStart setting.

Review checklist

Reminder for reviewers

Add options to suppress the debugging statusbar, toolbar and view.
As well as the saving before starting a debugging session.

Fixes eclipse-theia#12015

Contributed on behalf of STMicroelectronics
Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of questions/suggestions

@sgraband sgraband requested a review from tsmaeder March 13, 2023 10:39
@tsmaeder
Copy link
Contributor

There does not seem to be an option in the settings UI for debug.saveBeforeStart. Is this maybe missing in the preference schema?

Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the changes, but we need to decide whether the support for the saveOnStart preference should be in this PR or not. If not, could you please open an issue so we can track the problem?

@sgraband
Copy link
Contributor Author

I created #12319 for the follow up.

@sgraband sgraband requested a review from tsmaeder March 17, 2023 08:23
Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.

@tsmaeder tsmaeder merged commit 16be9ac into eclipse-theia:master Mar 17, 2023
@vince-fugnitto vince-fugnitto added this to the 1.36.0 milestone Mar 30, 2023
@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility debug issues that related to debug functionality labels Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vscode] Support DebugSessionOptions boolean options for suppression
3 participants