You can debug EGL services, web transactions, and UI programs when
using the Liberty Profile. Here are the steps to start EGL debug mode
for Liberty Profile.
- Add a new Liberty Server. For details, seehttp://www-01.ibm.com/support/knowledgecenter/SSMQ79_9.1.1/com.ibm.egl.pg.doc/topics/pegl_jsf_adding_web_server_tsk.html.
After you complete adding the new server, right-click the name of
the server in the Server view and choose Debug from the pop-up menu.
After debugging mode starts, stop debugging by right-clicking the
name of the server in the Server view and choosing Stop from the pop-up
menu.
Note: Start debugging Liberty Profile in Rational® Business Developer V9.5
will not start EGL debugger. Step 1 is helpful in the deploying the
project to Liberty Profile. After the project is deployed to the new
server in Liberty Profile, you should stop the debugger and use the
following steps to start EGL debug mode.
- Add IBMDebug.jar as a shared library to Liberty
Profile. You can find IBMDebug.jar in the bin
of the Rational Business Developer V9.5
installation directory. You should copy IBMDebug.jar to the Liberty
server Directory based on your server name. For example:
D:\Program Files (x86)\liberty855\usr\servers\myNewServer
You
can also copy IBMDebug.jar to the Liberty share
Directory and it can be shared for all servers. For example:
D:\Program Files (x86)\liberty855\usr\shared\resources
Add
IBMDebug.jar to
Liberty's server.xml as a shared library. For example:
<library id="IBMDebug" name="IBMDebug">
<file name="IBMDebug.jar"/>
</library>
- Based on the project name, deploy ProgramName.ear to
Liberty and add IBMDebug.jar as a shared library
classloader to the enterpriseApplication definition
in Liberty's server.xml file.
In Liberty's server.xml file,
you must add the shared library as a classloader location to the EAR's enterpriseApplication definition.
For example:
<enterpriseApplication id="ProgramNameEAR"
location="ProgramNameEAR.ear" name="ProgramNameEAR>
<classloader commonLibraryRef="IBMDebug"></classloader>
</enterpriseApplication>
- To prevent Rational Business Developer V9.5
from automatically attaching the JDT debugger, start Liberty in debug
mode from the command line using server.bat debug.
This will start Liberty and make it wait for a debugger to attach
(default port 7777).
Use the CMD command to find the liberty/bin directory
and server.bat debug serverName.
After the server debugging starts, you can see the CMD line as follows.
D:\Mysoft\liberty855\bin>server.bat debug myNewServer
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 7777
Do
not close the CMD window.
- Within Rational Business Developer V9.5,
create a WebSphere® Application
Server debug launch configuration. Use the configuration to attach
to the waiting Liberty by using the default port of 7777 and using WebSphere Application Server
V8.5 as the Server Type. You can find the configuration by selecting and double-clicking WebSphere Application
Server. Then fill in the Name and
select the appropriate project, select IBM WebSphere Server
V8.5 as the IBM® WebSphere Server type, and
then click Debug.
Then you can see that the attached information is displayed in
the CMD window. After those steps, you can debug EGL services in Liberty
Profile.