The most basic operations are:
1. Set a breakpoint in a Java file and run it. When the Program reaches the breakpoint, it will go to the debug view,
2. Both F5 and F6 are single-step debugging. F5 is step into, that is, the code is executed, and F6 is step over,
That is, execute the code of this line and jump to the next line,
3. F7 jumps out of the function step return
4. F8 is the last execution.
============================================
1. Step into (also F5) Jump
2. Skip step over (also F6)
3. Step return (also F7) after executing the current method, return jumps out of this method
4. Step filter: gradually filter and execute until unfiltered locations or breakpoints are encountered (set filter: window-preferences-Java-debug-step filtering)
5. Resume re-runs debug and runs until it encounters a breakpoint
6. hit count: Set the execution times to be appropriate for the for loop in the Program (Set breakpoint view-right-click hit count)
7. Inspect check operation. Execute an expression to display the execution Value
8. Watch monitors variable changes in real time
9. We often say that the breakpoint refers to line breakpoints. In addition to line breakpoints, there are other breakpoint types: field (watchpoint) breakpoint, method breakpoint, and exception breakpoint.
10. Field breakpoint is also called watchpoint. It is temporarily suspended when the member variables are read or modified.
11. Run-method breakpoint)
12. When exception breakpoint is added to catch execption (To be continued ...)
Breakpoint attributes:
1. How many times of hit count execution will be suspended for Loop
2. When enable condition meets your input conditions (true/change), it will be suspended temporarily.
3. This thread is temporarily suspended when suspend thread is multithreading.
4. The suspend VM is temporarily attached to the VM.
13. variables in the variables view can change the variable value. In the variables view, right-click the variable and choose change value. One time for quick debugging.
14. After some code is modified during the debug process --> Save & build --> resume from the breakpoint
======================================
For example, you have the following program:
Public static void main (string ARGs []) {
Mydate AA = new mydate ();
AA. adddays (day) ;================= "(1)
System. Out. println ("eeeeeeeeeeeeeee"); ===============" (2)
}
Public String adddays (INT more_days ){
System. Out. println ("1"); =============== (3)
String result = "" ;=============== "(4)
System. Out. println ("2"); =============== (5)
Return result;
}
You add a breakpoint at (1). When you run it here, if step into (also F5) is jumped in, then execute it to (3 ). Then execute step over (also F6) to execute the row, and then execute to (4 ). Finally, execute step return (also F7) to jump out of the adddays method and to (2)