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).
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With