且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在eclipse中使用调试透视图[调试java / j2ee应用程序]

更新时间:2023-12-04 08:06:58

Eclipse中的调试器将自动暂停执行(并让您检查变量/步骤/恢复等),如果抛出未捕获的异常。

The debugger in Eclipse will automatically suspend execution (and let you inspect variables/step/resume etc) if an uncaught exception is thrown.

输入例如以下程序...

Enter for instance the following program...

public class Test {

    public void methodA() {
        methodB("hello");
        methodB(null);
    }

    public void methodB(String s) {
        System.out.println(s.substring(2));
    }

    public static void main(String[] args) {
        new Test().methodA();
    }
}

...并点击一点错误图标或选择运行 - > 调试为 - > Java应用程序

... and click the little "bug"-icon or choose Run -> Debug As -> Java Application

  • Debugging a Java Program with Eclipse
  • Java Debugging with Eclipse - Tutorial