Check if Java bytecode contains debug symbols

久未见 提交于 2019-11-27 14:19:25

If you run javap -v on the class file, you will see the debug information that is present in the file.

It is worth compiling a simple test class with different -g option settings and looking at the results with javap.

If, you need to know exactly how javap presents the information, it is it is best for you to try it out in your Java installation. The output from the javap command may vary between different Java versions.

The most important thing a class file with debug information will contain is the LineNumberTable which maps bytecode instructions to source line numbers and the LocalVariableTable which tells the debugger where your local variables, including arguments to a method reside inside the VM during execution.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!