How can I respond to my program in the Output tab of Visual Studio Code?
I am using the Code Runner extension. Here is a picture of what I want (lower part, near "Ausgabe"):
How can I respond to my program in the Output tab of Visual Studio Code?
I am using the Code Runner extension. Here is a picture of what I want (lower part, near "Ausgabe"):
The Output panel doesn't support input. That's one of the reasons why they switched from Output panel to Terminal in version 2 of the Tasks API.
It seems the Code Runner extension supports running in the Terminal as well:
"code-runner.runInTerminal": true
In Visual Studio Code (for Mac OS) version 1.49.0, you can input data through the Output panel after you make the following change in settings:
Click the gear icon in the bottom left corner and select Settings:

Enter "run in terminal" in the search bar:

Check the box next to "Whether to run code in Integrated Terminal".
Attention: Remember to uncheck the box if you want to display the code results on the Output tab again.
Yup! you cannot write in the output terminal.
But if you don't want to run that in integrated terminal you can just modify your code-runner.executorMap to run that code in a new terminal, which closes after your execution gets finished.
"code-runner.executorMap":{
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && gnome-terminal -- bash -c \"./$fileNameWithoutExt\"",
"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && gnome-terminal -- bash -c \"./$fileNameWithoutExt\"",
}
this is for C & C++ and similarly you can write it for other languages as well.
here i have added the gnome-terminal -- bash -c \"./$fileNameWithoutExt\" part
for details of this command, Click here! .