如何在eclipse中使用调试透视图[调试java / j2ee应用程序] [英] How to use debug perspective in eclipse.[debugging java/j2ee applications]

查看:186
本文介绍了如何在eclipse中使用调试透视图[调试java / j2ee应用程序]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一个易于遵循的教程,用于在Eclipse中调试Java / J2EE应用程序?
一步一步的指导如何检查未检查和检查的异常?
我一直在尝试在互联网上找到,但没有用。

Is there any easy to follow tutorial for debugging Java / J2EE applications in eclipse? A step by step guide on how to check for unchecked and checked exceptions? I have been trying to find on the internet, but to no use.

推荐答案

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

这篇关于如何在eclipse中使用调试透视图[调试java / j2ee应用程序]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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