什么是debug文件下 介绍下Eclipse中如何debug程序?
介绍下Eclipse中如何debug程序?
怎样在Eclipse中使用debug调试程序? 最基本的操作是 首先在一个java文件中设断点 然后debug as-->open debug Dialog 然后在对话框中选类后--> Run
当程序走到断点处就会转到debug视图下 F 键与F 键均为单步调试 F 是step into 也就是进入本行代码中执行 F 是step over 也就是执行本行代码 跳到下一行 F 是跳出函数 F 是执行到最后
Step Into (also F ) 跳入 Step Over (also F ) 跳过 Step Return (also F ) 执行完当前method 然后return跳出此method step Filter 逐步过滤 一直执行直到遇到未经过滤的位置或断点(设置Filter:window preferences java Debug step Filtering) resume 重新开始执行debug 一直运行直到遇到breakpoint hit count 设置执行次数 适合程序中的for循环(设置 breakpoint view 右键hit count) inspect 检查 运算 执行一个表达式显示执行值 watch 实时地监视变量的变化
我们常说的断点(breakpoints)是指line breakpoints 除了line breakpoints 还有其他的断点类型 field(watchpoint)breakpoint method breakpoint exception breakpoint field breakpoint 也叫watchpoint(监视点) 当成员变量被读取或修改时暂挂 添加method breakpoint 进入/离开此方法时暂挂(Run method breakpoint) 添加Exception breakpoint 捕抓到Execption时暂挂(待续 ) 断点属性 hit count 执行多少次数后暂挂 用于循环 enable condition 遇到符合你输入条件(为ture改变时)就暂挂 suspend thread 多线程时暂挂此线程 suspend VM 暂挂虚拟机

lishixinzhi/Article/program/Java/ky/201311/28039