tubby
tubby

Reputation: 2144

show array in single line in debug view in eclipse

Arrays in my debug view in eclipse are shown element-by-element downwards. This makes it difficult visually if I have too many arrays since I have to keep scrolling and cannot see all of them on a single screen.

Is there a way to see the array in a single line in the Variables section of the debug view in Eclipse?

Upvotes: 2

Views: 371

Answers (2)

Higgor Valença
Higgor Valença

Reputation: 33

There's no way (that I know of) of showing the array in a single line in the Variables View. I don't have eclipse installed in this PC but, as Kulbhushan said, you can try to execute the code

java.util.Arrays.toString(array);

in the Display View (to open it go to Window > Show View > Display).

Upvotes: 1

Kulbhushan Singh
Kulbhushan Singh

Reputation: 625

You can use the below snippet to print in one line.

java.util.Arrays.toString(theArray);

Upvotes: 1

Related Questions