How to manually restart an extension in VSCode?

Viewed 2723

I just allowed an update to the PowerShell extension, and I'm now presented with this notice:

PackageManagement updated. If you already had PackageManagement loaded in your session, please restart the PowerShell extension.

I would love to know how to do this. I imagine a full VSCode restart would do the trick, but curiosity has got the better of me here. Someday I might need to do this without interrupting other work in progress.

Apparently it can be accomplished programmatically, but before we go there it'd be nice to know how to do it manually.

On the Manage menu for the extension, we have the Disable and Uninstall items:

enter image description here

...but no Restart.

Can this be done?

3 Answers

Not sure how to do that programmatically, but you can restart the PowerShell session by opening the "PowerShell Session Menu" and then click "Restart Current Session". See below:

image - Restart PowerShell Session

I was wondering the same thing for the powershell extension, and by poking around I found a potential solution (more of a workaround honestly):

  1. Hit the "Kill terminal" button (trashbin icon) KillTerminal (requires killing all active terminals)

  2. The following dialogue appears, click "Yes" to restart it: RestartDialogue

I confirmed too that the version did update: UpdateConfirmed

enter image description here Press Ctrl + Shift + P to Open Command Palette and Type Restart Extension Host

Related