Closed GorvGoyl closed 7 years ago
From @roblourens on September 10, 2017 19:25
I'm not sure what you mean by "VS Terminal won't be able to capture those inputs." Is that because it's not running the app in the integrated terminal? If so, this is a feature request for the extension.
VS terminal is the internal terminal of VS code. I've set the externalConsole": to false in launch.json but still i can't type anything in the terminal , i only see outputs of print statements. I'm not sure if this is the bug on extension side or your side. Your call.
From @Tyriar on September 11, 2017 17:6
I believe this is as designed, @isidorn can clarify
From @roblourens on September 11, 2017 17:20
Is it running in the terminal or the "debug console"?
when I debug a java file: In internal terminal(cmd) i see: >
Executing task: javac -g c:\Users\H213141\Documents\coding\console\java-debug\TestClass.java <
Terminal will be reused by tasks, press any key to close it.
but i can't provide user input here.
In debug console i see the program output ( i.e. System.out.println("provide some input:");
) if any. But I can't provide any user input here. Although i can debug variables in debug console.
From @isidorn on September 13, 2017 8:46
This is as designed, for programs that need input please use the external terminal. There is probably already a feature request open that we start suporting user input in debug console / internal terminal. @weinand would know more
Closing as designed
VS Code does take user inputs from internal terminal when we "run" the code (Java,c++, python etc). The problem comes when we "debug" the code.
From @weinand on September 13, 2017 9:53
Please move the issue to the repository of the Java debugger you are using. VS Code provides no built-in Java functionality, so we do not know what the problem is.
You can move the issue with this tool: https://github-issue-mover.appspot.com
Hi, seems like this issue is related to the java debugger extension. So I moved it from Microsoft/VSCode to your repo. Could you please take a look.
Please, next time comment just one, because one comment is one mail, I was a bit scared to see so many mails :sweat_smile:
And yeah, Java Debugger doesn't support integrated terminal yet, if you want to contribute send a PR :smile:
Didn't mean to scare you :D Actually, I used some issue migrator tool to migrate this issue from Microsoft repository and it included previous comments too, hence the email bombardment :P
@faustinoaq supporting the VS Code integrated terminal is trivial since VS Code is doing all the heavy lifting for you. From the debug adapter just use the "runInTerminalRequest" and pass the command line arguments. See here how this is done for node-debug.
Oh, I see. Thanks you for the node-debug reference :+1:
Keep discussion here :point_right: #67
From @JerryGoyal on September 10, 2017 6:45
Steps to Reproduce:
Install java debugger extension https://marketplace.visualstudio.com/items?itemName=donjayamanne.javaDebugger
configure launch.json:
Configure tasks.json:
Copied from original issue: Microsoft/vscode#34091