skip to Main Content

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


  1. You can try the following:

    1. use the shortcuts F5
    2. install and use the code-runner extension
    3. reinstall vscode
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search