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: add run statusbar item #8134

Merged
merged 1 commit into from
Jul 8, 2020
Merged

debug: add run statusbar item #8134

merged 1 commit into from
Jul 8, 2020

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Jul 3, 2020

What it does

Fixes: #5156

The following pull-request implements the select and run debug statusbar item:

  • includes a new preference debug.showInStatusBar
  • the statusbar item triggers the prefix select and run command
  • the statusbar item reflects the current debug configuration, and updates when the config changes, and when the preference value is updated

How to test

Verify that the debug status bar item is updated accordingly based on the preference value, and the configuration updates:

  1. start the application, and open the debug view
  2. preferences:
  • never: the debug status bar item is never displayed, if previously displayed it will be removed
  • always: the debug status bar item is always displayed (on app start as well)
  • onFirstSessionStart: the debug status bar item is displayed on a debug session is first started
  1. verify that the debug status bar item is updated when a configuration is updated (label), and when the preference value is updated

Example: updating the configuration changes the label

debug-sb

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

@vince-fugnitto vince-fugnitto added enhancement issues that are enhancements to current functionality - nice to haves statusbar issues related to the statusbar debug issues that related to debug functionality labels Jul 3, 2020
@vince-fugnitto vince-fugnitto self-assigned this Jul 3, 2020
@akosyakov
Copy link
Member

Is it configurable in VS Code?

@vince-fugnitto
Copy link
Member Author

Is it configurable in VS Code?

I was previously unaware of any configuration, but verifying I found the following preference which controls the behavior:

debug-statusbar

@vince-fugnitto vince-fugnitto force-pushed the vf/debug-statusbar branch 3 times, most recently from 607d96d to b81e6a3 Compare July 6, 2020 14:38
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

I have not tried, but code changes look good.

- adds the `select and run` statusbar item for debugging.
- the item is registered when a debug session starts, and reflects the
  current configuration.
- triggering the item will prompt the debug prefix quick-open menu.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@akosyakov
Copy link
Member

@vince-fugnitto could you assign someone to test it please?

Copy link
Contributor

@Anasshahidd21 Anasshahidd21 left a comment

Choose a reason for hiding this comment

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

The changes work well for me.
I verified by running mocha test on theia workspace(the preference value was set to onFirstSessionStart).
Tested the value never and always.
The status bar correctly updates with the change in configuration.

Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

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

LGTM
Works well
Could be in a separate PR: It would be nice to the end-user to know which value is the default value for any preferences when selecting it. In this case, by reading the code I can see it (default: 'onFirstSessionStart')

@marcdumais-work
Copy link
Contributor

In this case, by reading the code I can see it (default: 'onFirstSessionStart')

You can't always rely on the default preference value in the code, since the default can easily be overridden in the application's package.json.

Could be in a separate PR: It would be nice to the end-user to know which value is the default value for any preferences when selecting it.

Sounds like you're suggesting a potential Preferences widget improvement? However pretty orthogonal to this PR here, so if you care, you should open a separate issue about it, if none exist yet.

@lmcbout
Copy link
Contributor

lmcbout commented Jul 8, 2020

You can't always rely on the default preference value in the code, since the default can easily be overridden in the application's package.json.

As a developper of Theia, I can open the file and see the default value. As a end-user, the only thing I see is in the preference setting while running Theia, I don't look inside the code to find the default value. I did an extra test and in VSCode, the default value is identified in the preference setting. If we try to align Theia with VSCode, then the default value is not identified

I don't know about the other preferences default setting, i was just looking at the preference setting for this issue.

@vince-fugnitto vince-fugnitto merged commit fd9d8ec into master Jul 8, 2020
@vince-fugnitto vince-fugnitto deleted the vf/debug-statusbar branch July 8, 2020 19:11
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 enhancement issues that are enhancements to current functionality - nice to haves statusbar issues related to the statusbar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[debug] create 'select and run debug configuration' statusbar item
5 participants