Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detach the panel to a separate window?

I have a dual monitor setup. I frequently have my VSCode open in monitor-1 displaying both my editor and panel (e.g. output, problems, debug console, and terminal). To increase the area of my editor, I'd like to detach the panel and drag it to monitor-2. Is this at all possible, even with hacks or third party solutions? The issue was posed to the VSCode team several years ago (see here), but it hasn't been implemented as a native feature yet.

This Stack Overflow answer is to a different question. But for posterity, I tried the answers suggested there (including Duplicate Workspace in New Window and Open Active File in New Window). Those solutions do indeed allow me to open my file in two separate VSCode windows. But the panel in window 2 will not auto-update if I edit/save the editor in window 1. That is a requirement in my case.

As a last resort, I can indeed horizontally drag my VSCode window wider, so that it stretches into monitor-2. But I just thought I'd ask if there were any other solutions.

like image 658
cag8f Avatar asked Dec 05 '25 20:12

cag8f


2 Answers

Moving the panel to a new window is not supported (at the time of writing), however the behaviour that you are looking for can be achieved by moving your files to a new window and leaving the panel in the original window.
You can do this by right clicking on the file(s) you are working on and clicking Move into New Window. This will create a new window for you to work on your file, leaving the panel in the first window. The panel can then be expanded by pressing the ^ button (next to the close X button), filling the window with the panel. The panel will update as you change your files in the new window(s).
Also, if you have multiple files open in the first window, once you have created a new window with one of the files you can click and drag any other tabs that you have open into the new window to move them.

like image 58
Harvey Nash Avatar answered Dec 07 '25 15:12

Harvey Nash


This is the subject of feature-request Aux window: allow detaching views and panels #193267. I suggest that you give that issue ticket a thumbs up to show support for it. You can also subscribe to it to get notified about discussion and progress. Please avoid making noisy comments there like ones that just consist of "+1" / "bump".

For terminals, you can work around it by using terminal editors and moving those to the auxiliary window.

like image 34
starball Avatar answered Dec 07 '25 13:12

starball



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!