哪个调试工具可以列出内部化的字符串? [英] Which debugging tool can list strings internalized?
问题描述
我正在寻找一个可以列出已经内化的字符串的调试工具?理想情况下,我想加上一个标记,并在该标记后添加一个字符串列表。
I am looking to a debugging tool that can list the strings that have been internalized? Ideally, I would like to put a mark and have a list of the strings that been added after that mark.
提前致谢。
推荐答案
也许最简单的方法是使用字节码查看器。任何实例化的字符串都将出现在包含字符串文字的类文件的constant_pool中。例如,在我回答的另一个StackOverflow问题的最近一个类文件中,我的代码中有以下字符串文字: sun.awt.noerasebackground
。这在常量池中显示为'String_info'
类型。 JBIC是我使用的字节码查看器(和编辑器,所以要小心!)。 JBE下载
Perhaps the easiest way is to use a bytecode viewer. Any String that is interned will be present in the constant_pool of the class file the String literal is included in. For instance, on a recent class file from another StackOverflow question I answered, I had the following String literal in my code: "sun.awt.noerasebackground"
. This shows up in the constant pool as a 'String_info'
type. The bytecode viewer (and editor, so beware!) that I use is the JBE. JBE Download
这篇关于哪个调试工具可以列出内部化的字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!