Debugging and counting breakpoint hits

痞子三分冷 提交于 2019-11-29 05:33:49

You can add a condition into your breakpoint. The simplest one could look something like this:

System.err.println("Passing checkpoint");
return false;

You can also extend it by calling your own static class:

org.foo.StaticCounter.COUNTER++;
System.err.println("Passing checkpoint " + org.foo.StaticCounter.COUNTER);
return false;

As an alternative to counting breakpoints, you could use a profiling tool, such as the one here.

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