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

js-debug debugger terminal discoverability #98054

Closed
3 of 4 tasks
connor4312 opened this issue May 18, 2020 · 12 comments
Closed
3 of 4 tasks

js-debug debugger terminal discoverability #98054

connor4312 opened this issue May 18, 2020 · 12 comments
Assignees
Labels
under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@connor4312
Copy link
Member

connor4312 commented May 18, 2020

We want to explore ways to increase the discoverability of the debugger terminal. The entrypoints we have today are:

  • Command palette: undiscoverable
  • Debug welcome view: good discoverability, but only if you don't have a launch config
  • Scripts in package.json: this isn't the terminal itself, but is a common use case, good indirect discoverability.

Thing we can improve:

  • Contribute the debugger terminal into the Run and Debug dynamic configurations. Good discoverability, easy and no overhead.

  • contribution to ... in the debug view (august) deferred

  • a separate top-level dynamic debug configuration for the terminal

  • Kai suggested contributing a button to the debug terminal toolbar, in this area

    We would be careful to only do this if the workspace contains javascript files. @Tyriar thoughts?

@connor4312 connor4312 added the under-discussion Issue is under discussion for relevance, priority, approach label May 18, 2020
@connor4312 connor4312 added this to the May 2020 milestone May 18, 2020
@connor4312 connor4312 self-assigned this May 18, 2020
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue May 18, 2020
@eamodio
Copy link
Contributor

eamodio commented May 26, 2020

👍 to adding a new button to the terminal toolbar. Or even a debug button or something to turn a regular terminal into a debug one (if that is possible).

@Tyriar
Copy link
Member

Tyriar commented May 27, 2020

Hmm, it's already fairly busy up there with the dropdown and 5 buttons. Looking ahead a little bit, how would this interact with a future shell selector/tabs that I'm hoping to have similar to Windows Terminal:

image

Would debug terminal be a shell entry in the dropdown, using your default shell by default? Allowing you to enable it on any shell in a custom profile (similar to this](https://github.com/Tyriar/vscode-shell-launcher#settings))?

@connor4312
Copy link
Member Author

Something like that could work well. The debug terminal is a little 'weird' because it's a mode that can apply to any terminal, but we could just say it uses your default terminal and can be configured differently as desired.

I'm not sure if it's a pattern we use anywhere, but photoshop has these little arrows in the lower right of buttons to indicate you can click it or expand it. We could do something like that to avoid needing a separate button.

@connor4312 connor4312 modified the milestones: May 2020, June 2020 Jun 4, 2020
@jasonwilliams
Copy link
Contributor

@connor4312 do you know if theres a shortcut to cycle between Debug, Terminal, Output and problems?
Sometimes i need to go back and forth between Terminal and Debug.
I know ctrl + ` gets you to Terminal, but doesn't look like its possible to get back

@Tyriar
Copy link
Member

Tyriar commented Jun 15, 2020

@jasonwilliams you can add keybindings for workbench.action.nextPanelView and workbench.action.previousPanelView

@connor4312
Copy link
Member Author

One alternative Kai and I talked about last week is using the dropdown

In addition to "select default shell", "Create new terminal" could be one of the actions and/or extensions could contribute other actions to the area.

@Tyriar
Copy link
Member

Tyriar commented Jun 15, 2020

@connor4312 sounds like a good solution until we gets the tabs/new terminal dropdown separation 👍

@connor4312
Copy link
Member Author

One more suggestion. Kai and I talked about having some button in this area

This is a natural place for discoverability. I have two questions for this area:

  1. There's already a button for the debug console which is a nice bug + terminal icon, which is also a very natural icon for the debug terminal. Is there a way we can differentiate the debug terminal enough from those existing icons?

  2. This area gets crowded with a small sidebar. We should make sure it doesn't get too crowded.

    • The "run" title is standard on all views but probably irrelevant for the non-welcome debug view, since people's launch configs will already often say something like "Run app" or "Attach to extension host"
    • We could hide the debug console icon while a session is not currently in progress. It's always read-only then.
    • Some limit on how extensions can show a button there? For js-debug I would only show this when debugStartLanguage is js or ts.

cc @isidorn

@isidorn
Copy link
Contributor

isidorn commented Jun 22, 2020

@connor4312 makes sense to make the js-debug terminal more discoverable. Please note that we are adding ... button in all views to make hidden views more discoverable. More details here #98614

Due to that I see two good options:

  • We make the ... contributable such that js-debug can contribute a js-debug terminal action there
  • We make the behavior of the click on console contributable, so in the js-debug case this would open the js-debug terminal. I would dislike to have both of these actions as I think it can be quite confusing for users what is what.

Also for considerations look into a case the debug toolbar is docked via a setting in that area. Then we do not show these actions.

@connor4312
Copy link
Member Author

We make the behavior of the click on console contributable, so in the js-debug case this would open the js-debug terminal

I don't like the idea of installing an extension changing the behavior of an existing button in the UI.

A ... menu contribution would work 🙂

@isidorn
Copy link
Contributor

isidorn commented Jun 22, 2020

@connor4312 ok for this I have created
#100771

Unfortunetly I will probably not have time for this this week, and from end of next week I am on a long vacation. So let me know if you need it before so I provide some code pointers so you can also maybe look into it.
If it is ok to do it in August then I can also jump on it.

connor4312 added a commit that referenced this issue Jun 22, 2020
Previously if a debug extension provided multiple dynamic
configurations, we would just use the first debugger -- whatever that
was. This change now shows all configurations for which dynamic configs
are registered.

I also adjusted the picker to automatically select the first item if
there's only a single configuration provided. This works well for the
debug terminal, but also means that the user doesn't see the name of
the selected item, which might not be desirable. Open to pushback.

Together these finish the request for a separate top-level contribution
for the terminal in  #98054

Finally, with that adjustment I made a tweak so that the picker shows
up in a `busy` state while extensions are activating. Previously you
would select a dynamic configuration title and could have a few seconds
of delay before the picker came up, which is probably not desirable.
@connor4312
Copy link
Member Author

Sounds good. Closing this out as everything else is completed.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

5 participants