首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

Smart Hands-Eclipse Debug的一些用法(一)

2013-10-28 
Smart Hands-Eclipse Debug的一些用法(1)今天跟同事一起debug程序,真心发现Debug功能相对打印日志真的好用

Smart Hands-Eclipse Debug的一些用法(1)

今天跟同事一起debug程序,真心发现Debug功能相对打印日志真的好用很多。

1.For return:从当前行,强制退出某个方法段,而不是执行完毕再退出。

Smart Hands-Eclipse Debug的一些用法(一)

2.Change Value:改变变量的值

Smart Hands-Eclipse Debug的一些用法(一)

3.Inspect(ctrl+shift+I):查看变量的值

Smart Hands-Eclipse Debug的一些用法(一)

4.Watch(按两次ctrl+shift+I)将表达式的值放到Expressions.

step1:点击watch

Smart Hands-Eclipse Debug的一些用法(一)

step2:查看Expressions

Smart Hands-Eclipse Debug的一些用法(一)

5.Execute(Ctrl + U):执行表达式

Smart Hands-Eclipse Debug的一些用法(一)

6.添加有条件的断点

1.找到属性

Smart Hands-Eclipse Debug的一些用法(一)

2.添加表达式

Smart Hands-Eclipse Debug的一些用法(一)


7.对成员变量添加断点,当成员变量的值改变的时候,就会停下来等待debug。

给变量打断点:

Smart Hands-Eclipse Debug的一些用法(一)

执行到给变量改值的地方,即中断,等待debug。

Smart Hands-Eclipse Debug的一些用法(一)

热点排行