When clicking Run or Debug above the main function in a java file, results in ArgumentOutOfRangeException exception.
Version: 1.38.0-insider (user setup)
Commit: 185308c0dd317d73fe4c19dea347582dee9650de
Date: 2019-08-26T09:46:11.283Z
Electron: 4.2.9
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
Run or Debug above the main function.Repro project: here
ArgumentOutOfRange Exception:
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -5.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
No exception
May be related to https://github.com/microsoft/vscode-java-debug/issues/642
Try setting the console to internalconsole instead of integratedterminal
we have released a new version 0.22.0, it's supposed to mitigate the terminal issue. Could you have a try?
I am afraid, with java.debug.settings.console set to integratedterminal, the previous incorrect behavior still exists, in a different form:
& 'C:\Users\username\.vscode-insiders\extensions\vscjava.vscode-java-debug-0.22.0\scripts\launcher.bat' 'C:\Program Files\AdoptOpenJDK\jdk-13.0.0.33-hotspot\\bin\java' '-Dfile.encoding=UTF-8' '-cp' 'G:\dev\_my-projects\someproject\bin\test' 'abcd.pqrs.someproblem.Solution'
I was not expecting the above to be printed out.
i didn't understand what error you got. Could you share the whole screenshot of your terminal window?
This is on clicking Run:

Thanks, i got your problem. This is the expected behavior to print the command line.
If you want not to show the program command line, you can change the java.debug.settings.console to internalConsole or externalTerminal
Most helpful comment
Try setting the console to
internalconsoleinstead ofintegratedterminal