About Remote Debugging Java Programs

In addition to debugging code locally in the JDeveloper IDE, you can also debug code which is located on a remote machine or running in a different VM instance. This means that you can use the debugger to debug code that has already been deployed. The debugger can simultaneously attach to multiple remote VMs, so you can seamlessly debug distributed applications, such as JSPs deployed to a web server accessing EJBs deployed to an application server.

The main difference between remote debugging and local debugging is how you start the debugging session. For local debugging, JDeveloper automatically launches the program you want to debug (called a debuggee process) and then attaches the debugger to that program. For remote debugging, you must manually launch the program you want to debug. Also, if you are debugging a JSP or a servlet, you must manually start a browser to invoke your JSP or servlet.

Once the debuggee is launched and the JDeveloper debugger is attached to it, remote debugging is very similar to local debugging. Remember that you can use remote debugging when the debuggee process is running on the same machine as JDeveloper or when the debuggee process is running on a different machine.

Unlike local debugging, you must choose which protocol to use before you start your remote debugging session. The remote debugging protocols are configured in T ools | Project Properties - Debugger - Remote and include:

Attach to OJVM
OJVM is the default debugging protocol and is the fastest debugger available in JDeveloper. OJVM is available on Windows platforms only.
Attach to JPDA
Attach to JPDA is used when you are using a JVM other than OJVM. For example, if you are using Sun's Classic or HotSpot JVM. For more information about the Sun Java Platform Debugger Architecture (JPDA) Connection and Invocation, see java.sun.com/j2se/1.4/docs/guide/jpda/conninv.html.
Listen for JPDA
If you are using the Sun Microsystem's Java Platform Debugger Architecture (JPDA) and you would like the debugger to listen so that a debuggee can attach to the debugger. Also, choose this option if you are debugging remote PL/SQL programs.

Instructions for remote debugging servlets, JSPs, and EJBs are available for the following application servers:


Configuring Your Project for Debugging
Debugging in JDeveloper
Debugging Java Programs

 

Copyright © 1997, 2004, Oracle. All rights reserved.