One-step debugging: Mainly viewing the changes in variable content 1. set the breakpoint location and set it to Code 2 that may cause problems. run the program in Debug as Mode 3. f5 --> step into enters the method for internal debugging F6 --> step over Single Line Debugging F7 --> step over ends the current method debugging and returns to the method caller for internal debugging assertions: run the program add (int x, int y) www.2cto.com assertion in the Run as mode, which indicates that the condition must be true. When the condition fails, assret ret = 4 is prompted; assertion is disabled by default. The default value is-da. To enable assertion, you only need to pass the-ea parameter to the virtual machine. If the assertion fails, the content on the right of the colon is automatically output. asseret ret = 4: "output content"; unit test: Debug one or more objects. create a JUnit Test Case 2. add the corresponding Test method. JUint uses the method label to determine the method to be called. @ Before indicates the method called Before the Test. For initialization, @ Test indicates that the method is a Test method and there can be multiple, test parameters of different methods in the Test object are used to Test whether the specified conditions meet @ Test (timeout = 1) during the Test. The maximum execution time of the method is 1 millisecond, timeout indicates the method execution error @ Test (specified Ted = NullPointerException. class) determines whether the method has thrown a change exception. If it is thrown, the debugging result is correct. The opposite error @ After indicates that the method is called After the end of the guess, which is generally used for cleaning.