skip to Main Content

Can we not use input function in VS Code without enabling in Code Runner extension run in terminal..?

I am trying to run a program which contains an input function. But its not working when I am running the code. It just looks like its just frozen.

2

Answers


  1. Can we not use input function in VS Code without enabling in Code Runner extension run in terminal..?

    If you don’t set the output to go to the terminal, Code Runner uses the Output panel, which has no input mechanism. So I’m pretty sure the answer to that question is yes.

    Login or Signup to reply.
  2. You should use Python extension to execute the Python script.

    enter image description here

    If you must use Code Runner, add the following settings to make the result output on the TERMINAL panel, because OUTPUT does not accept user input.

        "code-runner.runInTerminal": true,
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search