As a developer, it is necessary to master the debugging techniques in the development environment. There are a lot of Java debugging techniques, such as Java Debug interface, and so on, according to the needs of specific projects, there are many worth to study and study. This blog post only summarizes the Eclipse breakpoint debugging techniques, and not enough places to ask the great gods.
1 Debug View
1.1 Thread Stack View
The thread stack view represents the stack of the current thread, from which you can see what code is running, and the entire calling procedure, along with the code line number. Describe the meanings of these buttons separately. From left to right, respectively:
1. Indicates that the current implementation continues to run until the next breakpoint, and the shortcut key is F8.
2. Indicates interruption of the entire process.
3. The current method is entered, and the shortcut key is F5.
4. Indicates that the next line of code is running, and the shortcut key is F6.
5. Means to exit the current method, return to the call layer, and the shortcut key to F7.
6. Returns the beginning of the current thread stack to begin execution.
1.2 Variable View
1. For the variable name view, displays all accessible instance variables and local variables in the current line of code
2. Show all the variable values
3. Variable values can be changed by this window
1.3 Breakpoint View
1. Show All Breakpoints
2. Disable the selected port in the current window 1 and click Enable again.
3. Exception Breakpoint
Often meet some anomalies, and then the program will exit, to find the place where the exception occurred is more difficult, fortunately, can hit an abnormal breakpoint. Where the exception is, the current thread hangs.
1.4 Expression View
The expression view is a more common view of the debug process, you can observe some of the variables you are interested in, you can add some of your own expressions, or you can see the results of a line of code running.
1. Expressions
2. Click the + sign position to add an expression.
Eclipse Breakpoint Debugging