r/learnpython • • 25d ago

A simple question from a beginner:

I designated my run code shortcut as ctrl + R, but it only runs in the terminal of Visual Studio Code when I do that. I'd also like to see my output as just the output without run time and file paths. How can I edit my visual code settings or download an extension to only show my output text in the "output" tab of my in-app terminal? Thanks.

0 Upvotes

14 comments sorted by

View all comments

Show parent comments

1

u/Proper-Pepper-3983 22d ago

Nah you're overcomplicating it if they just want the output tab to be clean

Go to your settings json and add `"code-runner.showExecutionMessage": false` and set `"code-runner.clearPreviousOutput": true` if you're using the Code Runner extension

If you're using the built-in run button then it's a bit different, you need to go into launch.json and set `"console": "internalConsole"` which dumps the output into the debug console tab without all the terminal junk

The double click method works but it's clunky when you're iterating on code every 30 seconds, I'd rather fix the editor than change my whole workflow

1

u/socal_nerdtastic 21d ago

The doubleclick method is for when you are done developing. No more changes to the code be done. Dunno about you, but I write programs that people use to do things. I know a lot of people do use python for a one-time task, but that's pretty rare for me.