Vscode-code-runner: [Bug] Running C++ code will not allow user to input text in Terminal

Created on 9 Mar 2020  Â·  6Comments  Â·  Source: formulahendry/vscode-code-runner


  • VS Code Version:
    Version: 1.43.0-insider (system setup)
    Commit: 5996fb81591e92fd0c547dc45e3f0350026d5962

  • OS Version: Windows 10

  • Code Runner Version: 0.9.16

Describe the bug
----[Original issue posted to VS-Code Team]

----[Handed over to the CPP Extensions Team]


    • [Now handed over to Code-Runner Extension]

To Reproduce
Steps to reproduce the behavior:

  1. Type code to ask for user input and then output the code to ask the user to enter their name.
  2. Ask user to input data asked into terminal (example in screenshot provided)
  3. use extension to run code.

Actual behavior
Not allowing users to input data into terminal when asked by the code.
the rendered code defaults to the (output) of the terminal in VS-Code or VS-Code Insiders edition.

Expected behavior
Use extension to compile and run C++ code created and allow user to input data,
that has been asked of them in the rendered code via the Terminal TAB of VS-Code & Insiders edition.

Screenshots
PLEASE Read The Entire Case Issue Here and view screenshot provided -- thats been submitted to microsoft
in the VS-Code Issue tracker, Which then was handed over to the CPP Extension Team Issue tracker,
Then I was informed by the CPP Extensions Team, that it is a Code-Runners Extension Issue.
.
76137284-ee2aab00-6008-11ea-9955-c5b35bf92857

Most helpful comment

I had this problem, too. To solve this open File > Preference > Settings. There you are going to find User and then scroll and find a checkbox Run in Terminal. Check the box. Now, the result of code is going to be shown in terminal where you can input numbers, strings...

I hope that I helped!

All 6 comments

I had this problem, too. To solve this open File > Preference > Settings. There you are going to find User and then scroll and find a checkbox Run in Terminal. Check the box. Now, the result of code is going to be shown in terminal where you can input numbers, strings...

I hope that I helped!

@MrSinner Thanks it worked for me

Another solution without any extendsion: Makefile

@MrSinner Im using the Console and i have the same problem, can i solve it the same way as the Terminal?

@MrSinner Im using the Console and i have the same problem, can i solve it the same way as the Terminal?

https://github.com/formulahendry/vscode-code-runner/issues/589#issuecomment-599210236
Have you even tried it, it does work well

@MrSinner Im using the Console and i have the same problem, can i solve it the same way as the Terminal?

#589 (comment)
Have you even tried it, it does work well

Oh Forget about it, i managed to bug out my console somehow, its works fine lol

Was this page helpful?
0 / 5 - 0 ratings