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
Basically System.out.format() and System.out.printf() split lines in unexpected positions and also treat %n inconsistently. From run to run it produces different results. Therefore notice, that the Current Result provided here is just one of many possible random outcomes.
Environment
Operating System: Windows 10 x64
JDK version: 1.8.0_181
Visual Studio Code version: 1.33.0 (user setup)
Commit: 0dd516dd412d42323fc3464531b1c715d51c4c1a
Date: 2019-04-04T15:14:28.026Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134
Java extension version: Version: 0.6.0 (according to changelog)
Steps To Reproduce
Create a file PrintfTest.java and open it with VS Code
Run
PrintfTest.java:
import java.util.stream.IntStream;
public class PrintfTest {
public static void main(String[] args) {
IntStream.range(0, 10).forEach(it ->
System.out.format("This is iteration %d. Hello VS Code! Hello RedHat!%n", it));
}
}
Current Result
This is iteration
0. Hello VS Code! Hello RedHat!
This is iteration 1. Hello VS Code! Hello RedHat!
This is iteration 2. Hello VS Code! Hello RedHat!
This is iteration 3. Hello VS Code! Hello RedHat!
This is iteration
4. Hello VS Code! Hello RedHat!
This is iteration
5
. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
7
. Hello VS Code! Hello RedHat!
This is iteration 8. Hello VS Code! Hello RedHat!
This is iteration
9. Hello VS Code! Hello RedHat!
Expected Result
Just 10 solid lines like in any observable terminal or IDE's console?
Additional Informations
none
The text was updated successfully, but these errors were encountered:
The issue is fixed in the upstream vscode. Have a try in the latest vscode-insider version.
In the standard vscode, you may need wait it ready in the next vscode version.
Initially the ticket was opened under redhat-developer/vscode-java at redhat-developer/vscode-java#872 .
The question is also on stackoverflow: https://stackoverflow.com/questions/55588019/debug-console-in-vs-code-with-java-support-erroneously-splits-lines-in-output-fo. However this looks more like an issue with vscode-java-debug extension and therefore the question might as well belong here.
Basically System.out.format() and System.out.printf() split lines in unexpected positions and also treat %n inconsistently. From run to run it produces different results. Therefore notice, that the Current Result provided here is just one of many possible random outcomes.
Environment
Operating System: Windows 10 x64
JDK version: 1.8.0_181
Visual Studio Code version: 1.33.0 (user setup)
Commit: 0dd516dd412d42323fc3464531b1c715d51c4c1a
Date: 2019-04-04T15:14:28.026Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134
Java extension version: Version: 0.6.0 (according to changelog)
Steps To Reproduce
Create a file PrintfTest.java and open it with VS Code
Run
PrintfTest.java:
import java.util.stream.IntStream;
public class PrintfTest {
public static void main(String[] args) {
IntStream.range(0, 10).forEach(it ->
System.out.format("This is iteration %d. Hello VS Code! Hello RedHat!%n", it));
}
}
Current Result
This is iteration
0. Hello VS Code! Hello RedHat!
This is iteration 1. Hello VS Code! Hello RedHat!
This is iteration 2. Hello VS Code! Hello RedHat!
This is iteration 3. Hello VS Code! Hello RedHat!
This is iteration
4. Hello VS Code! Hello RedHat!
This is iteration
5
. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
7
. Hello VS Code! Hello RedHat!
This is iteration 8. Hello VS Code! Hello RedHat!
This is iteration
9. Hello VS Code! Hello RedHat!
Expected Result
Just 10 solid lines like in any observable terminal or IDE's console?
Additional Informations
none
The text was updated successfully, but these errors were encountered: