Debug mode in Eclipse

When writing code with Eclipse, it is often impossible to run due to code errors. You can use debug breakpoints to debug and find out where the error occurs. You can  set breakpoints in a java file, and then run, when the program When you reach the breakpoint, you will go to the debug view. The  F5 key and the F6 key are both single-step debugging. F5 is to enter the current line of code to execute, F6 is to  execute the current line of code, and jump to the next line.  F7 is to jump out of the function  F8 is executed to the end. 
1.Step Into (also F5) Jump into 
2.Step Over (also F6) Skip 
3.Step Return (also F7) After executing the current method, then return to jump out of this method 
4.step Filter Step by step filtering until it encounters a problem Filtered position or breakpoint (set Filter:window-preferences-java-Debug-step Filtering) 
5.resume restarts the debug execution and runs until a breakpoint is encountered 
6.hit count sets the number of executions suitable for the for loop in the program ( Set breakpoint view-right hit count) 
7.inspect check operation. Execute an expression to display the execution value 
8.watch monitor the changes of variables in real time 
9. Breakpoints we often say refer to line breakpoints, in addition to line breakpoints, there are other types of breakpoints: field (watchpoint) breakpoint, method breakpoint, exception breakpoint. 
10. Field breakpoint is also called watchpoint (watchpoint) Suspend when member variables are read or modified 
11. Add method breakpoint Suspend when entering/leaving this method (Run-method breakpoint) 
12. Add Exception breakpoint to catch Execption Suspend at time (to be continued...) 
Breakpoint properties: 
1.Hit count how many times it is executed and suspend for looping 
2.enable condition Suspend when it meets your input conditions (for ture\change) 
3.suspend thread Suspend this thread when multi-threaded 
4.suspend VM Suspend the virtual machine 
13.Variables view variables can change the variable value, right-click the variable in the variables view--change value. Once for quick debugging. 
14. After modifying some code in the debug process-->save&build-->resume-->re-suspend at the breakpoint

Guess you like

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