I have java application with Eclipse IDE and WebLogic 11g server. Is it possible to debug application remotely? if yes how?
WebLogic Server debugging is based on the Java Platform Debugger Architecture (JPDA). Note: We are using the domain wl_server, to deploy and debug the provided application. To start WebLogic Server in debug mode, you will need to modify the startWebLogic. cmd script in the <WLS-root>\wlserver_10.
Select the Debug tab. Expand the scope labeled default or weblogic. Select the check box for the debug scopes or attributes you want to enable. Click Enable to enable (or Disable to disable) the debug scopes or attributes you have selected.
To debug your application, select a Java file with a main method. Right-click on it and select Debug As Java Application. If you started an application once via the context menu, you can use the created launch configuration again via the Debug button in the Eclipse toolbar.
In startWeblogic.cmd
file, add the following line before ENDLOCAL
line.
set JAVA_OPTIONS=%JAVA_OPTIONS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n
The Weblogic Server console should display the message:
Listening for transport dt_socket at address: 8453
In eclipse follow the instructions below:
Docs:
First, make sure you enable remote debugging on your startup script for Weblogic:
-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n
(address is the port number; remember this number)
Second, you need to set up a new Remote Web Application debug configuration in Eclipse:
Run -> Debug Configurations...
then create a new Remote Web Application configuration. Make sure you specify your host and port (noted above), and add any source for the web app on the Source tab.
You should now be able to run that debug configuration to debug a web app in Eclipse on the specified Weblogic server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With