Today I’ve encountered a very strange problem in Microsoft Visual Studio Code 2022. When I press the ‘play’ button to run my python code, nothing happens. This is true also with debugging.
There is no activity in either the built-in cmd or powershell terminals, but through these terminals I can run my code.
I have been using VSCode to write and execute Python code for months now with no issues – as recently as 10 hours ago! I have changed no settings or updated anything and I am at a loss.
I’ve checked the VSCode Python plugin and last update was 3 weeks ago, so unlikely that, but rolled it back anyway with no luck. I have also made sure my default terminal is cmd prompt, tried reloading and opening a new terminal, restarting PC, all to no avail.
Please help!
2
Answers
You can try the following:
I had the same issue, and apparently it was there because my previous workspace wasn’t closed (that is also why ctrl + shift + n worked for you)
You can close it by clicking File -> Close Workspace
And then opening the .py file again solved the issue.