Running Code in Output Without Running in Terminal First

I have the code editor installed and unchecked the run in terminal in the settings, but I still have to run my code in the terminal before I can print it in the output tab. Is there any way around this so I can print directly to output first?

If you are on vscode you can add the Code Runner extension then you don’t have to run your code from the terminal

Thank you for the response. I have the extension enabled. My issue is whenever I run code to print output, nothing happens. It is making me run the Python file (printing to the terminal then I can print to output. If there is no way around this I understand, it just forces me to spend extra time executing code in multiple locations. Thanks!

With code runner you shouldn’t need to execute the code in multiple places, just right click in the window where your code is and click ‘Run Code’ then it should print to the output

after right clicking and running the code, it printed my previous code as opposed to intended code

thats weird, be sure to close out your other running programs and save your new file, you can right click in the output box and click ‘Stop Code Run’

if that doesn’t work you may need to restart visual code and try again (make sure all old output/terminal windows are closed)

Thanks for all the help - I realized saving will allow me to print to output so I toggled save while running on and that’s worked so far

2 Likes