In many integrated development environments, such as IDEA, eclipse, myeclipse.
The role of Debug:
- Can help programmers quickly locate problems
- Help programmers get started with code quickly
1. Number 1 : show execution point
Quickly locate the location of the current program execution , for example, when you view the source code, you can drag it below. If you want to view the executed location again, you can use this button
2. Number 2 : step over (F8)
Let the program execute to the next step
3. Number 3 : step into (F7)
Enter the method to execute ( the version of the idea is different, after idea2019, it will jump directly to the next line of code and will not enter the method )
4. Number 4 : force step into(alt shfit f7)
Mandatory entry into the method for execution , suitable for entry into the method written by a third party.
5. Number 5 : step out (shift F8)
Jump out of the method , you can jump out of the method when debug enters a method
6. Number 6: drop frame
Enter and exit the method multiple times . After a part of the debug method is run, you can use this button if you want the method to enter the debug again.
7. Number 7 : run to curser (alt F9)
Quickly execute to the current cursor position. Move the cursor to a certain line, it will quickly execute to this line
8. No. 8 : evaluate expression(alt F8)
Run some short codes for us to check when debugging
9. No. 9 : trace current stream chain
It can help us see the changes in the data when debugging the stream part of the code.
Debug left column:
1. Number 1: rerun(alt F5)
Re-run in debug mode
2. Number 2: resume program (F9)
If there is a breakpoint behind the current code, it will execute to the position of the next breakpoint , otherwise the program will end.
3. Number 4: stop program (ctrl F2)
Stop program
4. Number 5: view breakpoint (ctrl shift F8)
View all breakpoints, you can choose to delete a breakpoint
5. Number 6: mute breakpoint
All breakpoints are invalid/effective
6. Number 7: get thread dump
View the status of the thread