Eclipse debugging tips

 

If you want to do good work, you must first sharpen your tools. It is very important to master the debugging skills of eclipse:

 

The first recommended article: http://www.cnblogs.com/xitang/p/4238923.html

The second recommended article: http://www.cnblogs.com/lingiu/p/3802391.html

 

 

especially the

0 Conditional breakpoint. . Sometimes there are a bunch of loops, and you may only focus on the debugging results of one of them, then you can use conditional breakpoints to set conditional,

 

2 and 3. Expressions can be evaluated 

Inspect

Inspect is used to view an expression. It is easy to view the variable value debug, but it is not easy to view the value of an expression. It is still this sentence:

this.getTradeDetail(uid, itemStr.subString(0,5))

If you want to see the value of getTradeDetail, you can't see the same variable value (although this is likely to be assigned to a variable...), to see the value of this expression, you need to inspect, the specific method is to select this line of expression , then right-click -> inspect, or a more convenient shortcut key combination: ctrl+shift+i

 

7. Drop to Frame  This function can make all debugging back to the starting point of the method, without having to re-interface to set a condition, it is a very good function. But it is also conditional: Note this command is only available if the current VM supports drop to frame and the selected stackframe is not the top frame or a frame in a native method. 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326339997&siteId=291194637