exited with code=0 in 0.074 seconds - Output window has no output in Visual Studio

Viewed 16154

A simple print("Hello") will not produce any output so I'm not sure what to do. I've tried pressing ctrl+ F5 but haven't found any effective solutions beyond this. i'm using the VS Code IDE under "Code", please help.

exited with code=0 in 0.074 seconds

Image of my output terminal:

image

7 Answers

It seems like the 'Code Runner' extension caused it. You can try to disable it to use 'Python' extension instead.

The reason you have been getting it is because you have code runner extension running on it. Due to which, you are getting code exited 0 error while running the python program.

Go to the Extensions -> search for (code-runner) -> Disable options (Click)

Then open the vscode and reopen it. You may then try to run the python program to get the desired results.

go to settings and type this --> @ext:formulahendry.code-runner / then you should see something like Code-runner: Show Execution Message Whether to show extra execution message like [Running] ... and [Done] ... if there is a mark next to the option remove it enter image description here

You can always open up the integrated terminal (keycode varies, but the default is ctrl+shift+` ) then run

python <file.py>

Go to the third terminal tab and run

python <filename>

The output should be visible in that space.

The output window only shows the status messages and code=0 means it ran successfully.

Your two extensions could be running together like code runner and the official Microsoft python extensions.

What worked for me personally was to disable the code runner extension, it will say reload required do that and then your vs code will run on the official python extension which means it will work now on the initial stages.

yes Today i faced the same problem instead of correct output getting code=0 and running The solution is in the coderunner

  1. In addition to uncheck this Execution Message Whether to show extra execution message like [Running] ... and [Done] ..

you can also check this run in integrated terminal

Related