ait*_*tee 1 java assert breakpoints skip step-into
因此,我在调试Netbeans Java应用程序时注意到在断言函数中使用函数调用时,您无法在该函数中触发断点或进入该函数.
起初我认为它必须与使用重写函数和我被覆盖的函数没有被调用有关,但我确认这不是正在发生的事情.它仍然被调用,但无法进入.
这是我尝试过的片段:
public class Example
{
public static boolean blah()
{
System.out.println("Executing"); //**Breakpoint here
return true;
}
public static void main(String[] args)
{
assert(blah()); //Cannot step into or hit breakpoint on this line.
blah(); //Can here.
}
}
Run Code Online (Sandbox Code Playgroud)
任何人都有任何想法为什么这不起作用?
| 归档时间: |
|
| 查看次数: |
144 次 |
| 最近记录: |