1

Two days ago I installed Visual Studio Code and it worked pretty fine. But now as I am opening Visual Studio Code it's opening multiple instances, how can I solve it..??

Edit: it seems Visual Studio Code opens every file present in the directory in another window how can I solve that..??

Aviral Goel
  • 55
  • 1
  • 1
  • 9
  • 1
    `restore windows` in CTRL+, (=Settings), see: https://stackoverflow.com/questions/29964825/how-do-i-open-multiple-instances-of-visual-studio-code – Luuk Jul 08 '21 at 06:04
  • Does this answer your question? [How do I open multiple instances of Visual Studio Code?](https://stackoverflow.com/questions/29964825/how-do-i-open-multiple-instances-of-visual-studio-code) – Matteo Pasini Jul 08 '21 at 06:06
  • This is not my question, i don't want to open multiple windows I want to open just one window in vs code – Aviral Goel Jul 08 '21 at 06:19
  • Hi, @Aviral Goel. Could you check that **openFilesInNewWindow** option is set to _off_? You can find this setting in _File > Preferences_ menu, use the top search textbox to find it. – Dave Miller Jul 08 '21 at 07:14
  • Yes..!! it fixed the issue, please submit it as a answer and I will accept it. – Aviral Goel Jul 08 '21 at 09:30

1 Answers1

1

I had similar problems as well (SECOND ACTION - in my answer should solve your problem). My system was suddenly "laggy" as well, with no prior sign of significant damage. My windows self-restarted on its own, attempting to fix the problem but still didn't resolve it. When I use the command:

code .

in the comand line to open a folder in visual studio code (vscode) editor, it opens multiple instances of windows tab. Below is how I tackled the two problems:

Two things (Actions);

FIRST ACTION: (targeted: Laggy windows OS)

I used the command prompt(in Admin mode) to run the command: ”

sfc /scannow

This action fixed some corrupt system file and solved the laggy nature. I noticed significant improvement, possibly restoring it to previous performance level. Check the Microsoft docs for more info.

SECOND ACTION: (Visual Studio Code opens multiple instances - should answer your question)

Open vscode editor, go to the setting and paste this in the search bar:

"workbench.editor.enablePreview": false

If you have this option marked, you should unmark it or set it to false depending on the interface you are presented and interacting with. This should stop vscode from running multiple instances and hopefully resolve your problem.

SamBuilds
  • 11
  • 2