Debugging a Project in JDeveloper

Make sure that your code is compiled with debugging information in Tools then choose ProjectProperties - 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:

  1. In a source editor, set a breakpoint on an executable statement by clicking in the margin to the left of the statement.
    The unverified breakpoints icon red_dot appears in the left margin.
  2. Select D ebug then choose Debug [filename.java] or click Debug Button on the toolbar.
    The class runs and stops at the first breakpoint.
  3. From the toolbar, click step_into_toolbar_icon Step Into to trace into a method call or click step_over_toolbar_icon Step Over to step over a method call.
  4. 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 source editor.
  5. In the Smart Data and Data windows, examine the arguments and variables.
  6. Display the Threads window to see the status of other threads in your program.

To edit and recompile:

  1. When you have found lines of code to change, you can end the debugging session by clicking terminate_icon Terminate on the toolbar, or by choosing Runthen choose Terminate.
  2. Edit your code in the source editor.
  3. In the Navigator, click the appropriate object node, then choose Run then choose Make <filename.java> from the main menu. The affected files in your project are recompiled, and you can run the debugger again.

About the Debugger Windows
Using the Source Editor When Debugging
About Breakpoints
Examining Program State in Debugger Windows
About Remote Debugging
Setting Preferences for the Debugger Windows
Configuring Your Project to Use the Embedded OC4J Server