0

I have two versions of a project that are intended to accomplish the same effect. One is an older implementation, while the second is an updated, modified, and (hopefully) enhanced version. The issue is that they are not giving identical outputs. Is there an option to have Eclipse print out a list of everything a program is doing such that I can compare them (with some sort of merge/diff tool) and find out where they diverge?

This is in Java, using JBuilder 2008, which is more or less identical to Eclipse.

4

2 回答 2

0

最简单的方法可能是使用 AOP(面向方面​​编程),它允许您以非线性方式添加代码。请参阅有关日志记录的这个问题,我希望它非常接近您的需要,以及 AOP 方法有多简单。

传统日志记录与 AOP 日志记录

@After("execution(* *.doSomething())")
    public void logAfter(JoinPoint jp){
        logger.debug("...");
    }
于 2010-09-17T21:55:08.840 回答
0

我不熟悉JBuilder。在 Eclipse 中,您可以右键单击项目并单击调试以启动调试器。然后,您可以在要开始调试的位置设置断点并逐步执行。这是网络应用程序还是独立应用程序?如果它是在服务器上运行的 Web 应用程序,那么您可能需要进行远程调试。

这是Eclipse 中调试设置教程的一个链接和另一个链接。

于 2010-09-17T21:20:30.100 回答