I'm using VisualVM to profile a Scala program that has been compiled with the default of -g:vars, which includes line numbers (verified with javap that the class files have line numbers). However, VisualVM isn't showing any line numbers in any of its profiling, only method names. Is there any way to make it show files and line numbers? Using VisualVM 1.3.2 (and if it matters: Sun JDK 6 and Scala 2.9.0.1).
Make VisualVM show line numbers
Asked Answered
Since this question comes up high in Google and several years have passed without an answer, I thought I would provide an alternative that probably didn't exist at the time. As an alternative to VisualVM, using Java Mission Control, which now comes with the latest JDK, you can profile and get line numbers. Line numbers aren't shown by default. You can show them in the Call Tree by right clicking on one of the tree lines and selecting "Distinguish Frames By >> Line Number".
For what it's worth, I filed an enhancement request at github.com/oracle/visualvm/issues/408 –
Incommunicative
© 2022 - 2024 — McMap. All rights reserved.