Python Tools Server Crashing
I recently encountered a problem with Python Tools not loading on VS Code running on Windows 10. After some research, I found out that the problem resulted from a corrupted dot net installation. As the Python Tools on VS Code installs the runtime with the Python Tools extension, the problem couldn't be resolved by installing the dotnet runtime. Uninstalling or disabling the Python Tools extension would also not help. The error below persisted.
Starting Microsoft Python language server.
Error:
An assembly specified in the application dependencies manifest (Microsoft.Python.LanguageServer.deps.json) was not found:
package: 'runtime.win-x64.Microsoft.NETCore.App', version: '2.2.4'
path: 'runtimes/win-x64/lib/netcoreapp2.2/System.Runtime.InteropServices.RuntimeInformation.dll'
[Info - 9:56:26 PM] Connection to server got closed. Server will restart.
Uninstalling and reinstalling VS Code did not solve the problem.
Solution
The solution is to find the extension folder of VS Code and delete the language server folder manually.
Unfortunately, this folder is not deleted when you uninstall the extension.
The extensions folder is in C:\users\yourname\.vscode\extensions\name-of-extension
Once you delete the folder languageServer.0.3.xx
, the extension will be downloaded again.
Other Extensions
The behavior of VS Code to retain corrupted extension files even after VS Code and the extension are uninstalled can create problems for other plug-ins as well. If your plug-in is acting weirdly or crashing, consider deleting the extension directory from your system from the .vscode
folder located in your home directory.
History