Duplicate output in Debugger Console

Answered

The following code:

System.out.println("foo");
System.out.println("ALPHA\nBETA");
System.out.println("ZOO\nBOO\n");
System.out.print("ZOO\nBOO\n");

Ends up with duplicate output in the "Console" debug window (opened with Cmd-5):

foo
ALPHA
   ALPHA
BETA
   BETA
ZOO
   ZOO
BOO
   BOO

ZOO
   ZOO
BOO
   BOO

 

 

As you can see each new line create a newline + TAB + duplicate output... why is that happening? It makes the console basically useless and I need to run my tests from the command line to have meaningful output.

The project uses SLF4J for logging, and using LOG.info, etc... has the same issue.

 

0
3 comments

Can't reproduce:

What OS and IntelliJ IDEA version do you use? What's your Java version? Any third-party plug-ins enabled?

Could you please prepare and provide a small sample project illustrating the problem and the exact steps to reproduce (complete zipped source tree and project files)?

0
Avatar
Permanently deleted user

Using macOS High Sierra (was the same on Sierra).

IntelliJ IDEA 2017.2.3
Build #IC-172.3968.16, built on August 22, 2017
JRE: 1.8.0_152-release-915-b11 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13

Only third party plugin is "Save Actions", but it does the same on a clean install of IJ.

Its taken out of a 3M lines of code project (100's of modules) I cant really extract a small sample project from it easily, it works fine in the Terminal and Netbeans.

Its built and ran with Gradle 3.4.1.

0

If you can isolate it in a smaller project, please file a bug at https://youtrack.jetbrains.com/issues/IDEA with the reproducible test case.

What Run/Debug configuration type do you use?

0

Please sign in to leave a comment.