Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Wednesday, July 27, 2011

Start WebLogic Server in debug mode

To be able to start the WLS in debug mode you normally need to add the following line to the JAVA_OPTIONS:

set REMOTE_DEBUG_ OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n

Now there is even more easier way to do so but just modifying the setDomainEnv.sh and put the following line:

 

1 debugFlag="true"
2 export debugFlag
3

Make sure that you put this line in front of the following part of the script:


 


1 if [ "${debugFlag}" = "true" ] ; then
2 JAVA_DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=${DEBUG_PORT},server=y,suspend=n -Djava.compiler=NONE"
3 export JAVA_DEBUG
4 JAVA_OPTIONS="${JAVA_OPTIONS} ${enableHotswapFlag} -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole..."
5 export JAVA_OPTIONS
6 else
7 JAVA_OPTIONS="${JAVA_OPTIONS} ${enableHotswapFlag} -da"
8 export JAVA_OPTIONS
9 fi
10


otherwise the debug mode is not going to switch on.


The default debugging port will be 8453, but you can change it by adding this on the top of the script file:


1 DEBUG_PORT="4000"
2 export DEBUG_PORT
3