如何退步Eclipse调试器? [英] How to step back in Eclipse debugger?

查看:118
本文介绍了如何退步Eclipse调试器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Eclipse调试器中执行反向执行?我正在处理的当前项目需要至少5秒的时间来读取和初始化文件中的数据,然后才能完成任何操作。如果我在调试器中超越,我必须终止程序并重新启动,这需要一段时间。

Is it possible to do reverse execution in Eclipse debugger? The current project I'm working on requires a minimum of 5 seconds to read and initialize data from a file before anything can be done. If I overstep in the debugger, I have to terminate the program and restart, and this takes a fair bit of time.

推荐答案

您可以使用Eclipse的 drop to frame 命令从顶部重新输入当前方法。但是它不会展开所发生的任何状态变化,所以它可能无法正常工作,这取决于您所使用的方法。

You can use Eclipse's drop to frame command to re-enter the current method from the top. But it won't unroll any state changes that have happened, so it may not work depending on the sort of method you're in.

另一个非常酷的工具确保让您及时回退,全方位调试器 [dead link?]。它通过在类加载器中加载类进行测试来工作,因此它可以记录代码所做的一切。它可以做很酷的事情,像回答何时,在哪里,为什么这个领域分配了现在的价值?用户界面相当笨拙,可能很难处理大型代码库,但在某些情况下,它可以节省大量时间。

Another really cool tool that actually does let you step back and forward in time is the Omniscient Debugger [dead link?]. It works by instrumenting classes as they're loaded in the classloader, so it can record everything that your code does. It can do very cool things, like answer "when, where, and why was this field assigned its current value?". The UI is rather clunky, and it can have a hard time handling large code bases, but for some cases it can really save a lot of time.

更新 Chronon 提供了它描述为DVR for Java的商业产品,它似乎是很多与ODB相同的东西。

Update: Chronon provides a commercial product that it describes as a "DVR for Java", which appears to do a lot of the same things as the ODB.

这篇关于如何退步Eclipse调试器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆