Eclipse 中的 Java 对象浏览器
我几乎确信 Eclipse 中有一个工具可以让我浏览我的应用程序对象。 Android 上有一些名为“分配跟踪”的功能,我可以在基本的 Java 项目中使用类似的功能吗?
我想查看已创建的对象列表。
我需要的是我的应用程序中所有对象的列表,如下所示: http:// developer.android.com/resources/articles/track-mem.html
我想查看分配给每个对象的内存量。
I'm almost sure there is tool in eclipse that will allow me to browse my application objects. There is something done for Android called allocation tracked, is there anything similar that I could use in basic Java project?
I'd like to see list of objects that has been created.
What I need is list of all object in my app something like this: http://developer.android.com/resources/articles/track-mem.html
I'd like to see how much memory is allocated to each object.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来您正在寻找的是一个分析器。这是一篇关于使用与 eclipse TPTP 捆绑在一起的文章:
http:// /www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html
网络上有一些文章描述了不同的探查器:
http://slashdot.org/story/06/06/30/0053237/Java -Profilers---Which-One-Are-You-Using
我正在使用并且非常满意的是 JProfiler。但它不是免费的。
It looks like what you're looking for is a profiler. Here is an article on using one bundled with eclipse TPTP:
http://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html
There are some articles on the web that describe different profilers:
http://slashdot.org/story/06/06/30/0053237/Java-Profilers---Which-One-Are-You-Using
The one I'm using and are very happy with is JProfiler. It's not free though.
当您运行应用程序时,请在调试模式下进行。这允许您设置应用程序状态基本上冻结的断点,并且您可以浏览运行时堆栈并查看当前与对象或字段关联的值。
when you run your application do it in debug mode. This allows you to set break points where the state of the application essentially freezes and you can brows the run-time stack and see the values currently associated with an Object or field.
您应该使用分析器,您可以下载 tptp 进行分析。
You should use a profiler, you can dowload tptp for profiling..