-
Notifications
You must be signed in to change notification settings - Fork 1.2k
VS Code freezes and crashes when the Python extension activates on Windows #14236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @andrepn, thank you for reaching out. I cross-checked this issue with what you initially reported on Discord, are all the following bullet points correct?
And you already tried:
👉 Do you mind trying the following:
(This is on macOS, but the folder structure should be similar on Windows) Thanks! |
Thank you for the reply. I'll try to post what you've asked for later today. |
Hi @kimadeline , First, the following are correct: no crash or error if the python extension is not installed and you're not editing a python file - correct I have tried all of the following: uninstalling VS Code I've followed your recommended steps twice but unfortunately I don't have any .log files: I tried crashing it twice and still this is all I see. Would it be helpful to see the contents of the exthost file? I'm wondering if my computer doesnt have enough RAM for so many virtual machines or if there is something out of wack with my Python path? Let me know what else you would like to see... Thanks again for your help. |
There's probably something else going on if VS Code is crashing when you're running it in Windows, or do you mean that it's a Windows VM? In any case, yeah, do you mind sharing what's in Thanks! |
Okay there is the exthost file and I was able to get a Python log file as well. |
Thank you! The python log that you updated ends with this line:
However that shouldn't be happening, since you have Python 3.8.6 installed locally. Does the Python REPL show up when you type
Side note: We are currently refactoring our interpreter discovery module (#12020), and as a result we should handle these errors more gracefully and not cause crashes. |
Okay it seems like we've found the problem. Here's more information than you asked for: When I type "python": Powershell: Python 3.8.6 REPL When I type "python3": Powershell: nothing Running the command from your comment: Powershell: nothing Do you know what steps I should take to fix this? |
Hmmmm this might be a red herring though, because even though we log the failure as an error, we continue on with interpreter discovery, and ignore the interpreter calls that failed. For example, this is how it looks on my machine:
For now, let's take a look at what is going on in your local install of the extension, and once that's done we can figure out what is going on in WSL. Can you try the following to get more detailed logs:
I also forgot to ask earlier, where does your local 3.8.0 Python install come from (python.org installer, Microsoft Store, Anaconda, etc)? Thank you! |
Sorry for the delay, I'll try to get this done later today thank you. |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off. |
Similar issues: #6687 #9554 #3967 #5437 #9093
Environment data
python.languageServer
setting: Pylance[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (
python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]Expected behaviour
Python extension loads when .py file is opened or created and VS code continues to function
Actual behaviour
"Python extension loading" appears then eventually VS code freezes and crashes or disconnects me from my remote WSL environment
Steps to reproduce:
1.Open vs code
2.Open or create a .py file with the Python extension installed and enabled
Logs
When I follow these steps running vs code locally it freezes and crashes. When I run them on WSL: Ubuntu it eventually disconnects which forces me to close. I don't see anything in the output panel before it freezes. Occasionally a new file will open called "Getting Started -Python" right before VS code freezes.
I am relatively new [to vscode and development] so if there is some output you think exists it is likely that I just don't know how to get to it without being told.
Thank you for your help...
Andrew Noel
The text was updated successfully, but these errors were encountered: