Reputation: 644
I have installed vscode to run Python. The programs shows the output in the output window but refuses to take any input, such as if the user is to feed in his/her name, nothing is displayed what is being typed in. As for example, in the below program:
name = input("What's your name? ")
print("Hello ", name, " welcome to Python!")
It's showing the prompt to the user "What's your name? ". but nothing can be typed in? What's the problem here?
Upvotes: 1
Views: 8734
Reputation: 3519
I use VS Code very sparingly and so the other answer was not very helpful. Here are some detailed steps.
Look for the 'console' json entry, and change it to match this:
"configurations": [
{
"name": ".NET Core Launch (console)",
...
"console": "integratedTerminal",
...
},
Upvotes: 1
Reputation: 12025
You need to configure the debugger:
1 Open the file to be debugged
2 From the debug configuration select Integrated Terminal/Console
3 Start debugging
If you don't have the integrated terminal open, press CTRL+~ to bring it up.
You can also use the normal terminal by choosing External Terminal/Console
at step 2 above.
Upvotes: 1