Remote debugging mit JDeveloper

Environment: JDeveloper 11.1.1.6
Für den lokalen Weblogic Server/Admin Server:
In order to allow for remote debugging, we need to edit the domain startup script startWebLogic.sh and specify JVM options for starting the server in order to support remote debugging of ADF applications.
The domain startup script can be located in the
%MIDDLEWARE_HOME%\user_projects\domains\\bin directory, where %MIDDLEWARE_HOME% .
Add the following line in JAVA_OPTIONS:
set REMOTE_DEBUG_JAVA_OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n
for example
JAVA_OPTIONS=”-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n -Dweblogic.security.SSL.trustedCAKeyStore=”/home/oracle/Middleware/wlserver_10.3/server/lib/cacerts” ${JAVA_OPTIONS}”
export JAVA_OPTIONS
Für managed Server (SPU):
Not startWebLogic.sh edit! That would have an impact on all managed servers! Instead, the parameters -Xdebug -Xnoagent -Xrunjdwp: transport = dt_socket, address = 4000, server = y, suspend = n in the Weblogic Admin Console under Settings – Server – – Server Start – add arguments:
debug

Configuring JDeveloper
The next step is to enable the remote debugging feature for your project in JDeveloper. To do this, go to your project’s properties. Select the Run/Debug/Profile section, and click the Edit button for the “default” setting. This will bring up a dialog where you can check the Remote Debugging option.

Enable debugging from Weblogic Console
Environment–>Servers–><>–>Debug
Select the required flags and click on Enable/Disable.
Enable the level of debug you need, e.g.: security, servlet, jdbc.This change does not require weblogic Server Restart.
You need Make sure the severity is set to debug in weblogic console:
Environment > Servers > MyServer > Logging >Advanced > Minimum severity to log: Debug
This change requires server restart.

Editing the script

Setting Up setDomainEnv.cmd
Near the top of your file add the following line to enable debugging.

echo ——————————————————————
echo Setting Debug to true
set debugFlag=true
echo ——————————————————————

Locate the following line locate further down the file and make a note of the port number.You can change the default port number as well.

rem set the port number
if “%DEBUG_PORT%”==”” (
set DEBUG_PORT=8453
)

Vinay

I am an Oracle ACE in Oracle ADF/Webcenter. Sr Java Consultant-working on Java/J2EE/Oracle ADF/Webcenter Portal/ content and Hibernate for several years. I'm an active member of the OTN JDeveloper/Webcenter forum. Passionate about learning new technologies. I am here to share my knowledge. Give your views and suggestion on [email protected] .

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusYouTube