To perform this task
|
Follow these steps
|
Start a local debugging session.
|
-
To debug the main project, choose Run > Debug Main Project (F5).
-
To debug any individual project, right-click the project and choose Debug Project.
|
Start a remote debugging session.
|
-
On the computer where program is located, start the program in debugging mode.
-
On the computer where the IDE is running, open the projects that contain the source for the program.
-
Choose Run > Attach Debugger.
-
Select the connector type, enter any required process information, and then click OK.
Note: See your VM documentation for information about the connectors it provides.
|
Debug a single file.
|
-
Select any runnable file in the Projects window and choose Run > Run File > Debug
your_filename
.
|
Finish a debugging session.
|
-
To finish the current session, choose Run > Finish Debugger Session (Shift-F5).
-
To finish any session, open the Sessions window (Alt-Shift-6), right-click the session, and choose Finish.
|
Set a breakpoint.
|
-
To set a line breakpoint, open the file in the Source Editor and click in the left margin on the desired line (Ctrl-F8).
-
In the Source Editor, select the element of
code on which you want to set a breakpoint and choose Run > New
Breakpoint (Ctrl-Shift-F8). Then set the breakpoint type and additional
options in the New Breakpoint dialog box.
|
Modify breakpoint properties.
|
-
Open the Sessions window (Alt-Shift-6), right-click the session, and choose Customize.
|
Set a watch.
|
-
Right-click a variable or expression in the Source Editor and choose New Watch (Ctrl-Shift-F7).
|
Suspend and resume a thread.
|
-
Open the Threads window (Alt-Shift-7), right-click the thread, and choose Suspend or Resume.
|
Manage which JDK classes the debugger steps into.
|
-
Open the Sources window (Alt-Shift-8) and select the checkbox for the archive file or directory containing the JDK sources.
-
Open the Sources window (Alt-Shift-8) and uncheck the checkbox for the source directories you do not want to step into.
|
Pop a call from the call stack.
|
-
To pop the most recent call from the call stack, choose Run > Stack > Pop Topmost Call.
-
To pop multiple calls, open the Call Stack
window (Alt-Shift-3), right-click the call that you want to remain at
the top of the call stack, and choose Pop to Here.
|
View information for a call on the call stack.
|
-
To move one level away from the main routine, choose Run > Stack > Make Callee Current (Ctrl-Alt-up arrow).
-
To move one level toward the main routine, choose Run > Stack > Make Caller Current (Ctrl-Alt-down arrow).
-
To make a call current, double-click the call in the Call Stack window.
|