myeclipse单步调试祥解,希望大哥大姐讲的详细点

来源:百度知道 编辑:UC知道 时间:2024/06/14 14:27:01
调试中各快捷键step into ,step over ,step return的作用是什么
最好是用一个例子说明,我将万分谢谢您!!

最基本的操作是:
1, 首先在一个java文件中设断点,然后运行,当程序走到断点处就会转到debug视图下,
2, F5键与F6键均为单步调试,F5是step into,也就是进入本行代码中执行,F6是step over,
也就是执行本行代码,跳到下一行,
3,F7是跳出函数 step return
4,F8是执行到最后。

=====================================

1.Step Into (also F5) 跳入
2.Step Over (also F6) 跳过
3.Step Return (also F7) 执行完当前method,然后return跳出此method
4.step Filter 逐步过滤 一直执行直到遇到未经过滤的位置或断点(设置Filter:window-preferences-java-Debug-step Filtering)
5.resume 重新开始执行debug,一直运行直到遇到breakpoint
6.hit count 设置执行次数 适合程序中的for循环(设置 breakpoint view-右键hit count)
7.inspect 检查 运算。执行一个表达式显示执行值
8.watch 实时地监视变量的变化
9.我们常说的断点(breakpoints)是指line breakpoints,除了line breakpoints,还有其他的断点类型:field(watchpoint)breakpoint,method breakpoint,exception breakpoint.
10.field breakpoint 也叫watchpoint(监视点) 当成员变量被读取或修改时暂挂
11.添加method breakpoint 进入/离开此方法时暂挂(Run-method breakpoint)
12.添加Exception breakpoint 捕抓到Execption时暂挂(待续...)
断点属性:
1.hit count