How to show the location of the code that invokes System.out.print when printing by configuring Eclipse console in java?

When I use console.log in Javascript in Vscode / Chrome, it always shows the location of the code that invokes console.log.
I can click on that & jump right into that location.

But Java in Eclipse seems never has such feature? Why? (there is no post online about this too?)

1

There are 1 answers

0
Benoît On

You can use loggers correctly configured to get path of file but if you want to debug with System.out.Print it is not a good way of doing. Prefer run the debugger, you can have more and better information. The beginner solution can be to add specific text to each like "Test1" then "Test2" Java is not supposed to log something when you ask it to print something. JS console.log is a logger not a printer like explained in the name.