Debugging a Project in JDeveloper
Make sure that your code is compiled with debugging information in
Tools | Project
Properties - Compiler before you
can make use of some of the debugger features such as viewing arguments
and local variables in the Data
window.
See About Debugger Icons
to determine the purpose and functions of the various debugger icons
displayed on the toolbar or in the debugger windows. Each of these
commands is also available from the Debug
main menu.
To set breakpoints and step through your code:
-
In the Code Editor, set a
breakpoint on an executable statement by clicking in the margin to
the left of the statement.
The unverified breakpoints icon
appears in the left margin.
-
Select D
ebug | Debug [filename
.java] or click
on the toolbar.
The class runs and stops at the first breakpoint.
-
From the toolbar, click
Step Into to trace into a method call or click
Step Over to step over a
method call.
-
Look in the Stack window
to examine the sequence of method calls that brought your program to
its current state. Double-click a method to display the associated
source code in the Code Editor.
-
In the Smart Data and
Data windows, examine the arguments and variables.
-
Display the Threads window
to see the status of other threads in your program.
To edit and recompile:
-
When you have found lines of code to change, you can end the debugging
session by clicking
Terminate on the toolbar, or by choosing R
un | Terminate.
-
Edit your code in the
Code Editor.
-
In the Navigator, click the appropriate object node, then choose
Run | Make <filename.java>
from the main menu. The affected files in your project are recompiled, and
you can run the debugger again.
Related topics
About the Debugger Windows
Using the Code Editor When Debugging
About Breakpoints
Examining Program State in Debugger Windows
About Remote Debugging Java Programs
Setting Preferences for the Debugger Windows
Configuring Your Project to Use the Embedded OC4J Server
Copyright © 1997, 2004, Oracle.
All rights reserved.