Cri*_*spy 20 java eclipse debugging exception
如何设置Eclipse以在发生异常时停止.
我有一个Eclipse断点设置来打破异常.在下面的代码示例中,我遇到的问题是Eclipse尝试打开Integer源代码.有没有办法让我的代码示例中显示的调试器中断?如果我向下移动堆栈跟踪,我将到达这一行,如果有一种方法可以在没有"Source not found"窗口的情况下执行此操作,那就太好了.
这可以在Visual Studio中完成,所以它让我疯狂,无法在Eclipse中找到这样做的方法.
package com.test;
public class QuickTest
{
public static void main(String[] args)
{
try
{
test();
}
catch(NumberFormatException e)
{
System.out.println(e.getMessage());
}
}
private static void test()
{
String str = "notAnumber";
Integer.parseInt(str);//<----I want debugger to stop here
}
}
Run Code Online (Sandbox Code Playgroud)
job*_*job 35
我不知道怎么去那里,但我只是这样做:
Window -> Show View -> Breakpoints
Run Code Online (Sandbox Code Playgroud)
在那个标签中有一个"J!" 允许您在异常上设置断点.
Integer.parseInt(str)?| 归档时间: |
|
| 查看次数: |
10639 次 |
| 最近记录: |