This topic describes common tasks you can perform when debugging a project.
For more detailed information, click the links in the right column.
To perform this task |
Follow these steps |
Start a local debugging session. |
- To debug the main project, choose Debug > Debug
Main Project (Ctrl-F5).
- To debug any individual project, right-click the project and choose
Debug.
|
Start a remote debugging session. |
- On the computer where the 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 Debug > Attach Debugger.
- Select the debugger, specify the connector type, enter any
additional required process information and click OK.
|
Debug a single file. |
- Select any runnable file in the Projects window
- Choose Debug file_name.
|
Finish a debugging session. |
- To finish the current session, choose Debug > 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 line breakpoint. |
- In the Source Editor, click
in the left margin next to the desired line.
|
Set any type of breakpoint. |
- In the Source Editor, select the element of code on which you
want to set a breakpoint.
- Choose Debug > New
Breakpoint (Ctrl-Shift-F8).
- In the New Breakpoint dialog box, select the breakpoint type, set
any required options, and click OK.
|
Modify breakpoint properties. |
- Open the Breakpoints window (Alt-Shift-5).
- Right-click the breakpoint, and
choose Properties.
- Change any required settings and actions and click OK.
|
Set a watch. |
- In the Source Editor, right-click a variable or expression and choose
New Watch (Ctrl-Shift-F7).
|
Set a fixed watch. |
- Open the Local Variables window (Alt-Shift-1) or Watches window (Alt-Shift-2).
- Right-click a variable or watch and choose Create Fixed Watch.
|
Modify a watch. |
- Open the Watches window (Alt-Shift-2).
- Right-click the watch, and choose Customize.
|
Suspend and resume a thread. |
- Open the Debugging window or Threads window (Alt-Shift-7).
- Right-click the thread and choose Suspend or Resume.
|
Step into JDK classes. |
- Open the Sources window (Alt-Shift-8).
- Select the checkbox for
the archive file or directory containing the JDK sources.
|
Manage which classes the debugger steps into. |
- Open the Sources window (Alt-Shift-8).
- Uncheck the checkbox for
any source directories you do not want the debugger to step into.
|
Pop the most recent call from the call stack. |
|
Pop multiple calls from the call stack. |
- Open the Debugging window (Alt-Shift-9).
- Right-click the call that you want to remain at the top of the call stack and choose Pop to Here.
|
Browse information for calls on the call stack. |
- To move one level away from the main routine, choose Debug > Stack > Make
Callee Current (Ctrl-Alt-up arrow).
- To move one level toward the main routine, choose Debug > Stack
> Make Caller Current (Ctrl-Alt-down arrow).
- To make a call current, double-click the call in the Debugging window.
|