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

Interactive window and debug console should use same widget for input #127498

Open
isidorn opened this issue Jun 29, 2021 · 6 comments
Open

Interactive window and debug console should use same widget for input #127498

isidorn opened this issue Jun 29, 2021 · 6 comments
Assignees
Labels
debt Code quality issues debug Debug viewlet, configurations, breakpoints, adapter issues interactive-window

Comments

@isidorn
Copy link
Contributor

isidorn commented Jun 29, 2021

Both the interactive window and the debug console should use the same widget for input since it has the same functionality:

  • suggestions
  • browsing through history
  • they should look and behave similar

I can look into extracting the debug console input into a separate widget that could be reused by the interactive window.

Code pointer for Debug Console input https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/debug/browser/repl.ts#L602

@isidorn isidorn added the debt Code quality issues label Jun 29, 2021
@rebornix
Copy link
Member

rebornix commented Jul 1, 2021

suggestions
browsing through history

We are now doing this in Debug, SCM and Interactive Window so definitely worth some joint efforts.

they should look and behave similar

Not sure how similar they should look like but the UI should be consistent.

@rebornix
Copy link
Member

rebornix commented Jul 1, 2021

#126415 (comment) issue has a lot of discussions around various topics so I'd like to share some thoughts on sharing the component after reading @isidorn 's comment

Also I agree with @joyceerhl that the interactive window is ultimately a debug console with the ability to display richer outputs. So our longer term goal is to have a common component where clients could ideally register their viewers: the debug console would use the tree as a viewer and the IW would register richer outputs.

I totally agree. With the ability of moving terminal into the editor, I'm not seeing any reason why we are going to disallow users to move debug console to editor pane in the future. If that happens, the difference between interactive window and debug console (code wise) is basically what Isi said: how we render the execution history. The common component is a composite editor which consists of a monaco editor and a viewer for execution history, which will support

  • hot exit (persist execution history and input box content on window reload, when it makes sense)
  • auto reveal to the bottom of the last item
  • auto layout (resize the viewer and input box properly)
  • a consistent arrow key history navigation
  • a consistent execute command w/ builtin keybindings
  • diagnostics and navigation handling (click on a diagnostic item from the problems panel should then open the widget and focus the input box)

@isidorn isidorn assigned roblourens and unassigned isidorn Aug 18, 2021
@roblourens roblourens added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 13, 2021
@roblourens roblourens removed their assignment Oct 13, 2021
@roblourens roblourens added interactive-window debug Debug viewlet, configurations, breakpoints, adapter issues and removed debug Debug viewlet, configurations, breakpoints, adapter issues labels Oct 13, 2021
@amunger amunger self-assigned this Aug 16, 2022
@amunger
Copy link
Contributor

amunger commented Dec 8, 2022

#127709 shows a significant difference between the two widgets, navigating up and down vs viewing history. So I'm not sure this is still ok to do if it's going to change that experience

@roblourens
Copy link
Member

Is that the right issue reference?

@amunger
Copy link
Contributor

amunger commented Dec 12, 2022

whoops, nope - edited

@roblourens
Copy link
Member

I'm not sure there's really enough code here to be worth it. You have a basic code editor, slightly different actions and options on each side, and I'd close this unless you can point to a bunch of shared code that is too complex to be copy/pasted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Code quality issues debug Debug viewlet, configurations, breakpoints, adapter issues interactive-window
Projects
None yet
Development

No branches or pull requests

4 participants