Eclipse's debug mode

In Debug mode, the compiler will record a lot of debugging information, and can also add a lot of test code to facilitate our testing and analysis and resolution of bugs.

1. Open eclipse and set a breakpoint on the code that needs to be debugged


2. Right-click in the writing area, select 'debug as'-->'java application' to enter debug mode, click yes for the content that appears


3. Layout of the debug mode of eclipse


4. Press F6 (single step to continue) to start executing the next line of code, here if we continue to press F6, the program will cycle step by step.

We can use F8 (step over: jump directly to the next breakpoint).


.



5. Cancel the breakpoint after execution



Guess you like

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