Вы находитесь на странице: 1из 1

The Debugger is used for development and not just error identification!!

Create a breakpoint where you want to start inspecting the state of your program while it executes, line by line.
To set a breakpoint: Double click the gutter to the immediate left of the targeted line of source code. The Breakpoint
tells the debugger to pause at this point. To eliminate a breakpoint: Double click the breakpoint.

To initially START a debug session from within the Java Perspective: Run Debug As Java Application Editors
There appears the dialogue box "Confirm Perspective Switch" Check "Remember my decision" Yes. Eclipse
switches to the Debug perspective.
Thereafter simply press <F11>.

In any "perspective", keep open only those frames that contain information that you will use.
When initially using the Debug Perspective, open the Edit, Breakpoints, Variables, Console and Tasks frames. Close all other
frames. Rearrange and resize the remaining open frames for optimal viewing.
Place Edit frames vertically on the left separated by tabs. Place the Variables and Breakpoints frames vertically on the right
separated by tabs. Place the Console and Tasks frames horizontally on the bottom separated by tabs.

To STOP a debug session: Press the stop button.

To start a NEW debug session: Press the Debug Button.


Use control keys to walk through the code line-by-line while inspecting values of variables.

All Eclipse action keys are documented in the Eclipse Run Menu Actions documentation. Begin by using
the following debug actions when generating and debugging code.
Function

Button

Hot Keys

Debug
Resume

Begin execution until reaching a breakpoint or end of program.


<F8>

Terminate

Purpose

Continue execution until another breakpoint or end of program.


Stop the debug session.

Step Into

<F5>

Move into the method or constructor being called and pauses.

Step Over

<F6>

Execute current line of code and stop at next line.

Step Return

<F7>

Finish current method then return to the calling method.

Debug Last

<F11>

Debug last launch or debug current selection.

Run Clean

<Ctrl><F11>

Run last launch or run current selection without debugging.

Вам также может понравиться