How to Open a New Window in Visual Studio Code
Visual Studio Code (VS Code) allows users to work on multiple projects simultaneously by opening separate windows or instances. This guide provides a quick and direct overview of the different methods you can use to open a new VS Code window, including keyboard shortcuts, the application menu, the command-line interface, and operating system shortcuts.
Method 1: Using Keyboard Shortcuts
The fastest way to open a new window in VS Code is by using a keyboard shortcut.
- Windows / Linux: Press
Ctrl + Shift + N - macOS: Press
Cmd + Shift + N
This will instantly open a clean, untitled VS Code window while keeping your existing session open.
Method 2: Using the File Menu
If you prefer using the graphical user interface, you can open a new instance directly from the top menu bar.
- Click on File in the top menu (on macOS, this is in the system menu bar at the top of the screen).
- Select New Window from the dropdown menu.
Method 3: Using the Command Line (Terminal)
If you are working in a terminal or command prompt, you can launch a
new instance of VS Code using the code command-line
tool.
To open a blank new window, run:
code -nOr use the full flag:
code --new-windowTo open a specific folder or project in a new window, append the folder path to the command:
code -n /path/to/your/projectMethod 4: Using the Operating System Taskbar or Dock
You can also launch a new instance directly from your operating system’s taskbar or dock.
- Windows: Right-click the VS Code icon in your Taskbar and select New Window (or middle-click the icon with your mouse wheel).
- macOS: Right-click (or Control-click) the VS Code icon in the Dock and select New Window.