You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
launcher.bat could not pass on redirected input into the java program being debugged #756
While integratedTerminal indeed preserved the < input.txt and passed it on unmodified, input.txt in the above example is redirected to launcher.bat as its stdin, instead of stdin for the java program to be launched.
A quick fix would be to replace the %* line in launcher.bat by more | %* so that data streamed into stdin of launcher.bat would be piped into the java program being launched using the more program. Unfortunately, more would treat input as text and modify line breaks. It would be better if the developers of this extension could fix this issue properly, by perhaps NOT using an intermediate launcher.bat script (which only perform one additional function which is the changing of code-page) but directly launch the java program with input redirection specified in the "args" array performed on the java program directly.
launcher.bat was introduced as a workaround to mitigate encoding issue, but with some side effects. It's on our plan to solve encoding problems in a more systematic way, and I believe we will also remove launcher.bat in coming versions.
Yes it is pretty clear what the launcher.bat is for. However, we in Redmond don't normally refer to bugs as "side effects" :-)
Losing the ability to debug redirected standard input could be quite a headache for students -- programming exercises often supply input data through stdin.
Activity
Eskibear commentedon Sep 26, 2021
launcher.batwas introduced as a workaround to mitigate encoding issue, but with some side effects. It's on our plan to solve encoding problems in a more systematic way, and I believe we will also removelauncher.batin coming versions.See:
microsoft/vscode-java-debug#622 (comment)
#720 (comment)
Nibikibaba commentedon Sep 27, 2021
Yes it is pretty clear what the launcher.bat is for. However, we in Redmond don't normally refer to bugs as "side effects" :-)
Losing the ability to debug redirected standard input could be quite a headache for students -- programming exercises often supply input data through stdin.