Powered By Blogger

Wednesday, January 5, 2011

JDeveloper Remote Debugging @OC4J


Oracle JDeveloper & Remote Debugging Using Oc4J

It's a series of actions to begin remotely debugging the deployed web applications, EJBs, Web Services ... etc.

Blog/Article only discussing remote debugging using JDeveloper and Standalone OC4J.

Steps:

1- Go to oc4j home and find ..\oc4j\bin\oc4j.cmd

2- Find variable JVMARGS and set its value to be
[-Xms512m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=512m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,suspend=n,server=y]

3- Go to Jdeveloper >> Tools >> Preferences >> Debugger >> Breakpoints >> Choose Global (Radio box)


4- Go to your project source code ... Right click your project and select Project Properties >> Run/Debug/Profile, Select Default to Edit it.
5- Click on Remote Debugging and Profiling check box in Launch Settings option

6- Go to Debugger -> Remote Options. Update the following properties:
Protocol: Attach to JDPA
Host: machine IP/Name where application deployed
Port: as configured in address property in step 2 (4000)

7- Start your oc4j server now,

8- Right click on your project >> Click on Start Remote Debugger

9- Put/define your breakpoints in source code and begin calling any EJB, Web service, JSP, Servlet ... etc

10- Enjoy debugging facility ......

No comments:

Post a Comment