Green
Green

Reputation: 30795

How to restart VScode after editing extension's config?

VScode notifies you when you open a config of an extension:

remember to Restart VScode

enter image description here

But it says nothing about how. They use capital letter for the restart word, so normally it should mean something if you emphasize an appellation. Is there some hidden restart button or a key shortcut? How do I restart the IDE?

Upvotes: 310

Views: 377451

Answers (11)

Sharon A
Sharon A

Reputation: 2627

On a Mac:

  1. Open the Command Palette

    CMD + shift + p

  2. Then type

    Reload Window
    

    Then hit enter.

Upvotes: 10

Bogdan
Bogdan

Reputation: 789

On Windows/Linux:

  1. Open the Command Palette

    Ctrl + Shift + P

  2. Then type:

    Reload Window
    

Upvotes: 69

Wosi
Wosi

Reputation: 45213

Execute the workbench.action.reloadWindow command.

There are some ways to do so:

  1. Open the command palette (Ctrl + Shift + P) and execute the command:

    >Reload Window    
    
  2. Define a keybinding for the command (for example CTRL+F5) in keybindings.json:

    [
      // other key bindings ...
      {
        "key": "ctrl+f5",
        "command": "workbench.action.reloadWindow",
        "when": "editorTextFocus"
      }
    ]
    

Upvotes: 526

Yash Jadhav
Yash Jadhav

Reputation: 149

Use Ctrl + Shift + P in Windows OR Hit F1 to Open Command Palette then type Reload Window

Upvotes: 9

Nils Klarlund
Nils Klarlund

Reputation: 19

For a more comprehensive restart, use File → Exit.

Indeed, Google search seems to insist that this post also answers: How to restart VSCode so that changes to $path are reflected? Unfortunately, the suggested reloadWindow function does not update changes to $path.

The answer is to use the menu item File → Exit — a hot exit. Then restart VScode.

Upvotes: 1

Monte Hayward
Monte Hayward

Reputation: 477

Cmd+Shift+P Developer: Restart Extension Host

Command Palette Developer Restart Extension Host

It is easier now, and maybe more granular than "restart window".

Upvotes: 2

Juan Colchete
Juan Colchete

Reputation: 67

To make reload window shortcut works:

  1. Press Ctrl + Shift + p and open command pallet
  2. Type keyboard shortcuts (JSON) and press enter
  3. On the keybindings.json file:
  • On the key field pass the shortcut
  • On the command field pass workbench.action.reloadWindow
  • On when field pass a empty string to this shortcut work without an specific condition
[
    {
        "key": "ctrl+f5",
        "command": "workbench.action.reloadWindow",
        "when": ""
    }
]

Upvotes: 3

How to bind Ctrl+Alt+R to Restart

File > Preferences > Keyboard Shortcuts -or- Ctrl+K,Ctrl+S
(Code > Preferences > Keyboard Shortcuts -or- K,S on macOS).

This opens the default Keyboard Shortcuts window :

Default Keyboard Shortcuts

Click on the icon in the upper right corner with tooltip Open Keyboard Shortcuts (JSON) that looks like:

Click this icon to open user 'keybindings.json'

This opens your keybindings.json on a per-user level. Paste or type :

{"key": "ctrl+alt+r", "command": "workbench.action.reloadWindow"},

(Make sure your keybindings are surrounded with square brackets, [].)

Why Ctrl+Alt+R and not Ctrl+R ?

There are two reasons I bind Restart VS Code to Ctrl+Alt+R.

  • Ctrl+R already has two other bindings: File: Open Recent... and quickOpenNavigateNextInRecentFilesPicker.
  • It's a blink to the Microsoft legacy of Ctrl+Alt+Del.

If you need more help, try:
https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-layouts

If all else fails, Ctrl+Alt+Del

Upvotes: 5

lava
lava

Reputation: 7353

Method1

VIEW->COMMAND PALETTE->RELOAD WINDOW

enter image description here

Method2

cntrl+Shift+p Then Type: Reload window (Method1 same but using shortcut)

enter image description here Method3

cntrl+R

enter image description here

NB:if Method3 did'nt work try this approach https://stackoverflow.com/a/71046140/7706354

Upvotes: 1

kaizen
kaizen

Reputation: 1638

You can use this VSCode Extension called Reload

Marketplace > reload

Upvotes: 9

Bonnie Nyambura
Bonnie Nyambura

Reputation: 341

You can do the following

  1. Click on extensions
  2. Type Reload
  3. Then install

It will add a reload button on your right hand at the bottom of the vs code.

Upvotes: 22

Related Questions