Spaceship222
Spaceship222

Reputation: 849

Make VSCode python debug print output to terminal

When debugging, vscode will not print output to terminal when print(..). I try to set "console": "externalTerminal",but it does not work, neither with "console": "IntegratedTerminal".
I figure out why this happends, since python will not print output until it meets newline. For example,

print("hello", end=" ") # will not output
print("world") # will output "hello world"

Upvotes: 0

Views: 8791

Answers (1)

houseofleft
houseofleft

Reputation: 447

To see printed outputs in your terminal, make sure that your panel is showing first off ('view' -> 'appearance' -> 'show panel').

Then check that you are viewing the right part of the panel. VSC has a 'debug console' and a 'terminal'. The 'debug console' is a place to test inputs and outputs with your code, but any print statements will be output to your terminal.

screenshot here

Upvotes: 1

Related Questions