How can I tell if compiled java classes have debug metadata included?
Optional:
It would be nice only if I could see if debug metadata is lines, vars or source or combination of some of them.
Found nice tool for viewing .class files (http://www.codexterity.com/classexp.htm) but that's where I am stuck not sure where to look. Thank you.
Essentially, there is bytecode in the class file that have debug information.
If you run javap -v
on the class file, you will see the debug information that is available. It is worth compiling a simple test class with different -g
option settings and looking at the results with javap
.
See Check if Java bytecode contains debug symbols for more.
Normally only line numbers are included but you can use '-g' option this option generates all debugging information, including local variables.
Read about Debug information in Java .class files
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