Shay Shmeltzer's Oracle Development Tools Tips

  • October 24, 2005

Setting up Remote Debugging with JDeveloper 10.1.3 EA1 and OC4J 10.1.3 DP4

Shay Shmeltzer
Director of Product Management - Oracle

One of the things I often see requests for in the JDeveloper forum is setting up remote debugging for web applications.

Setting it up for Servlets is quite easy - you just mark your project run/debug configuration to do remote debug and set the attach to JPDA in the remote-debug specific runtime configuration node.

Then you start your OC4J with the debug parameters - something like this:

C:dp4j2eehome>c:jdk5binjava -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -jar oc4j.jar

Now set a break-point in your servlet and run a remote debug - once you invoke the servlet from a browser it should reach the breakpoint.

For JSPs there is one more step that is needed. (In the JDev 10.1.3 EA1 the online help is a little out-dated and details some extra steps that are not needed)

You need to edit the global-web-application.xml file in the OC4J config directory and have at-least the following parameters set for the JSP part:

<init-param> <param-name>debug</param-name>

<param-value>true</param-value> </init-param>

<init-param> <param-name>developer_mode</param-name>

<param-value>true</param-value> </init-param>

<init-param> <param-name>encode_to_java</param-name>

<param-value>true</param-value> </init-param>

<init-param> <param-name>reduce_tag_code</param-name>

<param-value>false</param-value> </init-param>

<init-param> <param-name>extra_imports</param-name>

<param-value></param-value> </init-param>

<init-param> <param-name>main_mode</param-name>

<param-value>recompile</param-value> </init-param>

<init-param> <param-name>debug_mode</param-name>

<param-value>true</param-value> </init-param>

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.