Monday, March 7, 2016

Remote debugging in Weblogic server using Eclipse

In Weblogic server,
Select relevant managed server and go to "Server Start" tab/ Then in the "Arguments:" text box, append following parameters
   -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

Then, in Eclipse,
  1. Add a new "Remote Java Application" in the Debug Configurations (via the menu: Run -> Debug Configurations).
  2. Make sure the correct project is selected (Browse button) and fill in server name in "Host" and 8000 in "Port".
  3. To avoid Eclipse stopping debug at "Daemon Thread [Timer-xxx] (Suspended (exception RuntimeException)) TimerThread.run()",
    • Go to Preferences -> Java -> Debug
    • Uncheck "Suspend execution on uncaught exceptions" 
Note: It is not necessary to wait until managed server finish startup for the debugging. You can start the debugging after you initiate the managed server startup. This means you can debug post start/activate actions of the managed server also.