In VS Code, when running a python program via the debugger, with launch.json, and console setting set to "internalConsole", then I can't receive input from the command line. I'm not sure if it's supposed to be like that, and thus if that's just a limitation of that setting?
By the way, i'm talking about when clicking the green play button, not the little white play button in the top right. And not the big white play button on the far left sidebar/ in the activity bar{1}. (I see that the big white one brings up the green one. And I see that the little white one isn't associated with the debugger. And the little green one is for the debugger 'cos when I have a breakpoint it stops on the breakpoints when I use the little green one). So hence i'm talking about when clicking the little green one.
I have found that I don't need to use launch.json, and i've found that if using launch.json then i'm fine with the default setting for console, of IntegratedTerminal, but that aside, suppose I do use launch.json, and with the "internalConsole" setting.
Note- I have at times gotten a timeout error when using the default option of IntegratedTerminal which I resolved with one of the answers here Visual Studio Code Python Timeout waiting for debugger connection by using the InternalConsole setting. Right now i'm not getting a timeout error with IntegratedTerminal, and i'm asking about InternalConsole setting in this question.
in VS Code, does the launch.json setting of console: "internalConsole" make it impossible to get input from the console? (error of EOFError )
The above is my question
I'll just expand a bit on the process I did to create the project.
I see that when no folder is open then when clicking the big white button with the insect on it, it mentions about creating a folder. And when creating a folder/directory, it gives a link to create a launch.json file. So I made a directory/folder and opened it in VS Code and in that bar on the far left, the "activity bar" {1} I clicked the big white play button with a pic of an insect crawling up it, to bring up more options, and I chose "create a launch.json file".
I see that the launch.json file has a setting for "console", and that setting, has these three possible values. "integratedTerminal" and "externalTerminal" and "internalConsole". And i've seen that "integratedTerminal" is the default.
When I try running the program via the debugger, so, using VS Code's green play button, then the input line fails. whether input()
or raw_input()
(what python 2.7 uses).
If I run it manually from the terminal within VS Code(and uncomment the input line!), then it's fine. It lets me input whatever.
But if I choose "internalConsole" in launch.json then I get the "EOFError" I mentioned.
{1} https://code.visualstudio.com/docs/getstarted/userinterface and https://code.visualstudio.com/api/ux-guidelines/activity-bar