I've searched for this answer but it was futile, a lot of threads are open with no answer whatsoever or the answer is just not the one that was asked.
How do I use the integrated terminal that comes on the bottom of VS:Code?
That allows the user to input and also see the text that is printed on the terminal when one normally executes a program.
I'm learning C
and I can't make it work there.
As you can see, if I run my code through the debugger, it doesn't work, AKA does not allow user input.
Keep in mind that this is what happens if I use launch.json
option called "externalConsole": ,
and set it to true.
But also this has it's drawbacks (for example as soon as the code finishes running the console exits and ceases existence therefore one can't read the output of the program)
How can this be solved? I've seen it working fine but on Linux environment computers. Thanks.
The launch.json
file has a "console"
setting, which you must set to "integratedTerminal"
(the default is "internalConsole"
, which only displays output from your program).
launch.json
file is the configuration for your project's debugging sessions. You can open it via the command palette with Debug: Open launch.json
or by clicking the cogwheel icon in the toolbar at the top of the Run
view: Starting a debugging session automatically switches to the DEBUG CONSOLE
tab in the panel (lower window pane).
Switch to TERMINAL
to interact with your console application.
See the docs for more information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.