question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Restore all windows when closing them all at once

See original GitHub issue

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

  • VS Code Version: 1.60.2
  • OS Version: Ubuntu 21.04 / Gnome

Steps to Reproduce:

  1. Open two windows (optional : open folder/files, do some modifications and save them), then click on “Quit 2 Windows” to quit VS Code :

Screenshot

  1. Open VS Code again : only the last active window is reopened (no matter what value is set in window.restoreWindows)

However, if VS Code is closed by another mean (like pkill code), on the second launch all windows are correctly restored. What is causing this behaviour, and how to fix it ?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bpaserocommented, Dec 8, 2022

We just trigger our quit function manually then:

https://github.com/microsoft/vscode/blob/b92894493e6f971a3c71912d823e699d3a05d643/src/vs/platform/lifecycle/electron-main/lifecycleMainService.ts#L546

I think the issue here is that the action in Linux closes the windows one by one. If we had a new event to override this behaviour and call our quit method it would probably work for us.

0reactions
deepak1556commented, Dec 8, 2022

Ah I see the issue, we need a new event or existing window-all-closed event to be emitted for the context menu quit action ? What event do we use on Windows and Linux to determine quit action from File > Exit ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to reopen all windows in Chrome? - Super User
To open all windows separately and all the tabs in order you can always use this ->whenever you close chrome and then reopen...
Read more >
How to restore a browser window you just closed by accident
Click the first option on the drop-down menu under “Recently Closed" to open the last window you shut. (If a recently closed window...
Read more >
How to Make Chrome Reopen All Tabs When You ...
Finally, click on the 'Restore Window' option from the extended menu to reopen all the tabs. Alternatively, you can also use the keyboard ......
Read more >
closing or restoring windows all at once - voidtools forum
@Raccoon, I've just started ploughing through autohotkey to get an idea of how it works but in the meantime I've managed to find...
Read more >
Restore all Firefox windows and tabs after closing
You can close and restore individual windows as long as you leave one window open. You can also close and restore tabs; I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found