Reputation: 8620
I am using Python's raw_input to get input from keyboard.
How do I debug my code with PyCharm? I am unable to input from keyboard when (for example) name = raw_input("Input your name")
is executed.
Upvotes: 2
Views: 6879
Reputation: 83
The workaround I found (at least for input()
, but I guess it's the same problem) is to check Emulate terminal in output console
in your run config. Open up your run configuration | Modify options
dropdown | Emulate terminal in output console
.
Always show Debug Console
seems to have no effect on that problem for me.
You can also track and up-vote the issue here: https://youtrack.jetbrains.com/issue/PY-42002/Not-able-to-use-input-while-debugging-with-remote-interpreter
Upvotes: 0
Reputation: 21
For users of IntelliJ, "Always show debug console" is under IntelliJ IDEA -> Settings -> Build, Execution, Deployment -> Console
Upvotes: 2
Reputation: 3200
You enter the input into the console that shows up, when you compile and run your script. Like so, the green text is the input.
Upvotes: 3