[英]Java Eclipse Create Heap-Dump on Breakpoint
How do I make a heapdump at a breakpoint in eclipse? 如何在eclipse的断点创建一个dumpdump?
My Java program has 2 versions that do the same thing with 2 different methods. 我的Java程序有2个版本,它们使用2种不同的方法来完成相同的任务。
One of these methods runs into a Heap Space Exception but the other doesn't. 其中一种方法遇到堆空间异常,而另一种则没有。
I was able to get the heapdump for the one that encountered an error by setting the VM argument -XX:+HeapDumpOnOutOfMemoryError 我可以通过设置VM参数-XX:+ HeapDumpOnOutOfMemoryError获得遇到错误的堆转储。
For the program using the method that doesn't get the error, I want to get a heapdump at a certain breakpoint. 对于使用不会出错的方法的程序,我想在某个断点处获得一个堆转储。 How can I do this?
我怎样才能做到这一点?
您始终可以使用jvisualvm连接到该进程,然后右键单击并进行堆转储。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.