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

查看:37
本文介绍了如何退回 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.

另一个非常酷的工具,它实际上确实可以让您及时后退和前进,它是 Omniscient Debugger.它通过在类加载器中加载类时对其进行检测来工作,因此它可以记录您的代码所做的一切.它可以做很酷的事情,比如回答什么时候、哪里、为什么这个字段被分配了它的当前值?".用户界面相当笨重,处理大型代码库可能会很困难,但在某些情况下,它确实可以节省大量时间.

Another really cool tool that actually does let you step back and forward in time is the Omniscient Debugger. 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 提供了一种商业产品,它描述为DVRJava",它似乎做了很多与 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天全站免登陆