weblogic enables debug mode

weblogic enables debug mode

Step 1:
Modify startWebLogic.cmd and add a line (not at the bottom)
Java code set JAVA_OPTIONS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=7777,server=y,suspend =n,
where address=7777 is the port number, which can be changed!

Quote -Xdebug to
activate debugging.
-Xnoagent
Sun typical VM, which supports both the old sun.tools.debug interface and the Java Platform Debugging Architecture (JPDA); the -Xdebug option enables both, but runs the sun.tools.debug agent by default . The -Xnoagent option turns off the agent so that JPDA can be used.
-Djava.compiler=NONE
disables the JIT compiler. Debugging a typical VM requires disabling its JIT compiler.
-Xrunjdwp
loads the in-process debugging library and specifies the type of connection to be made. The transport=dt_socket option tells the debugger which transport mechanism to use. Specifying the dt_socket option enables the debugger to listen for incoming client connections. The other possible value is dt_shmem, which applies when both the debugger and the application server are installed on the same host.
address=7777
The TCP port number you want to use for debugging communications. It should be the same port number you specified in the remote server configuration.
server=y
indicates that the JVM is running in debug mode.
suspend=n
indicates that the server does not keep waiting until a debugger connection is established. If the suspend=y option is used, when execution begins, the application server will suspend and wait until a debugger connects to it.


Step 2: Eclipse settings There are a few (used by the drbugger) on the
Internet that have to be chosen, but I have seen them, these are the default ones!


PS: When Compile, add the -g option (including debug information), the default Eclipse Compile has been added.

Step 3:
go Debug Configurations... 

 

Note that the Port number here is the address=7777


Allow termination of remote VM set in startWebLogic.cmd, so you don't need to select it!
Press debug to start!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326581479&siteId=291194637