Home > Enterprise >  VSCode Python Extension: Extension host terminated unexpectedly
VSCode Python Extension: Extension host terminated unexpectedly

Time:10-22

Running the latest version of VSCode: 1.61.2 in Windows 10. Everything was working fine until Yesterday when my Python extension gave me this error "Extension host terminated unexpectedly" and I'm unable to run or debug Python files in VSCode.

enter image description here

I did a complete removal of VSCode (including the App, the code folder in AppData, and the .vscode folder). But when I reboot, reinstall and run VSCode and install the Python extension by Microsoft v2021.10.1365161279, I get the exact same error.

It seems like this should just work like it has for me for many years. Is there any way to find out what is breaking it?

I can successfully open and run Python files in remote WSL instances using VSCode, just not in Windows.

[Edit: The problem turns out to be Mozilla VPN. If I exclude VSCode from it, then the Python extension works.]

CodePudding user response:

Lots of people reporting issues with the Python extension on Windows right now. There's an alleged fix for the fatal performance issues here, for example, but this hasn't made it into the regular update cycle yet afaik.

I'd suggest using VS Code Insiders or disable the Python extension for the time being or find a way to revert to an earlier Python extension version.

[Update] It looks like the changelog for 2021.10.2 (20 October 2021), to version v2021.10.1365161279, includes the following fixes:

  1. Ensure we filter out unsupported features in web scenario using shellExecutionSupported context key. (#17811)
  2. Fix unresponsive extension issues caused by discovery component. (#11924)
  3. Update debugpy to 1.5.1 to ensure user-unhandled exception setting is false by default. (#17789)

So, I'd test uninstalling and reinstalling the Microsoft Python extension. It works for me with this new update.

CodePudding user response:

It turns out the problem is my Mozilla VPN. If I turn it off, then my Python extension works, and it also works if I exclude VSCode from the VPN.

  • Related