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

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>

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today