We can debug our ADF web application by having the code pointed to a stand alone weblogic server.
To achieve that the startWeblogic.sh script that is present in <domain_dir>/bin/ , should be modified to keep the below entry, usually after java -version line
JAVA_OPTIONS="-Xdebug -Djava.compiler=NONE -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=10171,suspend=n $JAVA_OPTIONS"
After the above change, the startWeblogic.sh is executed to bring up the server. Now the server listens at 10171 port for debugging.
Now, go to your adf application and choose the project that has the code you want to debug. Click on the Project Properties and edit the current run configuration with the host name and debug port details as shown in below pic.
To achieve that the startWeblogic.sh script that is present in <domain_dir>/bin/ , should be modified to keep the below entry, usually after java -version line
JAVA_OPTIONS="-Xdebug -Djava.compiler=NONE -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=10171,suspend=n $JAVA_OPTIONS"
After the above change, the startWeblogic.sh is executed to bring up the server. Now the server listens at 10171 port for debugging.
Now, go to your adf application and choose the project that has the code you want to debug. Click on the Project Properties and edit the current run configuration with the host name and debug port details as shown in below pic.
Now save the project and right click on it and select "start Remote Debugger". This will make the project to attach to server at the debug port as mentioned.
With this, when server is running the use case whose code is in the project configured, the control flows to the source code attached and can be debugged with debug points.
No comments:
Post a Comment