Search code examples
pythonvisual-studio-code

VSCode Python extension loading forever, saying “Reactivating terminals”


After updating VS code to v1.92, the Python extension consistently fails to launch, indefinitely showing a spinner next to “Reactivating terminals…” on the status bar.

Selecting OUTPUT > Python reveals the error Failed to resolve env "/mnt/data-linux/miniconda3".

Here’s the error trace:

2024-08-07 18:35:35.873 [error] sendStartupTelemetry() failed. s [Error]: Failed to resolve env "/mnt/data-linux/miniconda3"
    at ae (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1968174)
    at oe (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1966134)
    at Immediate.<anonymous> (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1962428)
    at processImmediate (node:internal/timers:478:21) {
  code: -4,
  data: undefined
}

How do I fix this? Restarting worked, but that's not sustainable.


Solution

  • The bug has been fixed in the Python extension version v2024.14.1 - so you just need to update the extension and reload the extension host.

    Setting the locator to js is a workaround that pins to the legacy resolution method which will become less well supported over time. So updating is most likely the best solution for everyone now.

    Here's how to update the python extension to the latest version*

    enter image description here