Skip to content

Support virtual desktops on windows #152869

Open

Description

@dosinsk

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
  • OS Version:

Steps to Reproduce:

Please don't allow el stupido (vscode-triage-bot) to close this!!!

I'm working at a fairly large MSFT site, so if you need upvotes, I'll get them!

Issue Type: Bug

I'm running Windows 11, and have multiple virtual desktops configured. On many of them, I have both VS Code and Google Chrome windows open. When I restart the computer, I exit out of both programs manually first (in VSC, via File -> Exit, and in Chrome, via the hamburger menu -> Exit). Exiting in this manner (instead of using the Close / X button in the top-right corner) closes all the windows of each program together, and allows the session to continue where it left off after reboot (VSC has the same Workspaces and tabs open, Chrome has the same windows and tabs open).

When I relaunch each of these programs, Chrome restores each window to the virtual desktop it had been on before the restart, whereas VSC restores all the workspaces/windows to the current desktop.

I'd love it if VSC could behave like Chrome, and restore each workspace/window to the virtual desktop it was on initially.

VS Code version: Code 1.63.0 (7db1a2b, 2021-12-07T06:26:56.179Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No
Fetching remote diagnostics for 'wsl+ubuntu' timed out.
Remote OS version: Linux x64 5.10.60.1-microsoft-standard-WSL2

System Info
Extensions (29)
A/B Experiments

Activity

  1. vscodenpa commented on Jun 22, 2022

    @vscodenpa

    Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.68.1. Please try upgrading to the latest version and checking whether this issue remains.

    Happy Coding!

  2. dosinsk commented on Jun 22, 2022

    @dosinsk
    Author

    VS Code version: Code 1.68.0
    OS version Windows_NT x64 10.0.22000

  3. added
    feature-request
    windows
    workbench-os-integration
    workbench-window
    on Jun 22, 2022
  4. vscodenpa commented on Jun 22, 2022

    @vscodenpa

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  5. jayjadav08 commented on Jun 22, 2022

    @jayjadav08

    +1

  6. BenCrespoDuke commented on Jun 22, 2022

    @BenCrespoDuke

    +1

  7. lordheart commented on Jul 1, 2022

    @lordheart

    Edge also supports restore to windows correctly. Windows should make this easier.

    My company has now reinstated auto shutdown every night so every morning it means placing all my open vs code projects back into their proper desktops.

  8. DJackman123 commented on Jul 9, 2022

    @DJackman123

    Another aspect of virtual desktop support would be not having VSCode switch desktops when opening a file via command line. When I use "code" to open a file, it will open that file in the most recently used instance of VSCode, which will switch desktops if that instance was on a different desktop. I would prefer that it open the file in the most recently used instance only on the current desktop, ignoring other desktops. If VSCode isn't opened on the current desktop, then launch it there. In other words, don't ever have VSCode switch desktops.

  9. vscodenpa commented on Jul 15, 2022

    @vscodenpa

    🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  10. DrCyanide commented on Aug 23, 2022

    @DrCyanide

    This has definitely been the main reason I delay applying updates to Visual Studio Code as long as I possibly can. If the windows could just stay where I want them, then the only hassle would be logging back into the remote servers.

  11. JodiTheTigger commented on Nov 20, 2022

    @JodiTheTigger

    Just commenting so that people finding the old closed duplicate find this current one:
    (closed duplicate) #88257

    apparently this is waiting on an electron API update (6 years old: electron/electron#5362)

    so if any coders want to get this moving - then implement a virtual desktop API for electron, then get vscode to pick it up.

  12. added
    keep
    on Dec 8, 2022
  13. Mugane commented on Feb 1, 2024

    @Mugane

    Two years later... any update on this? Shall we expect it this decade or at least by 2040 perhaps?

  14. brunnerh commented on Aug 20, 2025

    @brunnerh

    One more thing that ideally should be restored: Flags like "Show this window on all desktops" that can be set from the window context menu in the task view.

  15. dimy-osman commented on Aug 23, 2026

    @dimy-osman

    Still happening in 2026, including Cursor (VS Code fork) on Windows 11.

    Same comparison as the original report: Brave / Chrome / Edge restore each window to the virtual desktop it was on. VS Code / Cursor restore every window onto the current desktop.

    Chromium already persists the desktop GUID via IVirtualDesktopManager and moves the window back on restore. This does not need a new Windows API. Also chiming in on the latest duplicate: #319435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestkeepwindowsworkbench-os-integrationworkbench-window

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions