When running code (Python, C/C++ etc) I can't take input from keyboard. The text output is showing correctly. But when it needs to take input from keyboard (i.e. input() function from python, scanf() from c) the output console is not working. There is no response from keyboard. I can write code on editor correctly, but can't write in output console.
I'm running the latest version (both vs code and code runner extension).
Can confirm.
Workaround:
Open settings and add to the .json file:
// Whether to run code in Integrated Terminal.
"code-runner.runInTerminal": true,
This opens the code in the terminal which has a working input.
But then the shortcut for stop run code doesnt work...
Thanks. It worked. But what is the problem in output console? Can't it be fixed?
There is no need of stop run code because I can simply kill the Terminal to stop running code.
@hosainm You are right. stop run code is no need when running in terminal.
If you want to input, need this setting "code-runner.runInTerminal": true
谢谢,完美解决了我的问题.而且输入进到ZSH了
欢迎
I got the same problem with you. I wrote a C file and used CODE RUNNER to run it, but it had nothing to show in the console. And if I re-clicked the running button, it popped a small window indicates that the code was still running. After that I tried to delete the scanf() function, everything ran in the right way. So I had to execute it only in the terminal. Anyway, it's not a big deal. But I hope this issue could be solved one day. ^_^
Most helpful comment
Can confirm.
Workaround:
Open settings and add to the .json file:
This opens the code in the terminal which has a working input.
But then the shortcut for
stop run codedoesnt work...