-
I realize what I am asking is probably impossible. Thus, feel free to rephrase the question as “what is the closest we can get to this.”
-
I am using IntelliJ IDEA. Thus question assumes the developer is using IntelliJ IDEA.
-
Any time we throw an exception in Kotlin/IDEA, the console has a nice display of:
EXCEPTION MSG
... some class info .... (file_name: line_number)
... some class info .... (file_name: line_number)
... some class info .... (file_name: line_number)
... some class info .... (file_name: line_number)
then, if I click on any of the (file_name: line_number), IDEA jumps to the right file_name / line_number.
- What I want / my actual question:
I want the above for regular console output (i.e. via println/prin).
I want to scroll in the IDEA console, right click on a piece of console output, and have the option of “jump to the file name / line number that generated this output.”
I realize there is an extra overhead here – where, for each char of output, we have to store a (file name / line number) pair – but I am willing to pay that price.
Question: What is the closest we can get to the above? To be able to click on a piece of output and ask “where was this generated” ?