0

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"
1
  • Can you share a screenshot? VSCode already has an integrated terminal. If its not visible to you, To open the terminal (options): 1. Use the Ctrl+` keyboard shortcut with the backtick character. 2. Use the View > Terminal menu command. 3. From the Command Palette (Ctrl+Shift+P), use the View: Toggle Integrated Terminal command. Commented May 21, 2020 at 9:43

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.