Server User Manual

Table Of Contents
80 Developing Applications for J2EE Servers
Enabling remote debugging
2 Edit the launch script and add the following remote debug parameters to the java
command line:
-Xdebug
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,address=3999,suspend=n
3 Launch the server using the script.
4 In JBuilder, choose Project|Project Properties. If you have not yet created a server
run configuration, choose New and create a new configuration of type Server. If you
already have a server run configuration, choose Edit.
5 Select Debug|Remote in the tree and check the Enable Remote Debugging and
Attach options and click OK.
Click the down arrow next to the Debug Project icon ( ) on the JBuilder toolbar and
select the debug run configuration you just created or edited. You will now be able to
set breakpoints in Java code, such as in EJBs, servlets, and so on.
WebSphere Single Server 4.0
If you are using WebSphere Single Server 4.0, follow these steps to enable remote
debugging:
1 Launch the server with the -script option:
WEBSPHERE_HOME/bin/startserver -script
This command should write a script called launch in the WEBSPHERE_HOME/bin
directory.
2 Edit the launch script and add the following remote debug parameters to the java
command line:
-Xdebug
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,address=3999,suspend=n
3 Launch the server using the script.
4 In JBuilder, choose Project|Project Properties. If you have not yet created a server
run configuration, choose New and create a new configuration of type Server. If you
already have a server run configuration, choose Edit.
5 Select Debug|Remote in the tree.
6 Check the Enable Remote Debugging and Attach options and click OK.
Click the down arrow next to the Debug Project icon ( ) on the JBuilder toolbar and
select the debug run configuration you just created or edited. You will now be able to
set breakpoints in Java code, such as EJBs, servlets, and so on.
WebSphere Server Advanced Edition 4.0
WebSphere Server Advanced Edition 4.0 launches another Java virtual machine for
debugging, so you must follow instructions so you can debug your enterprise beans:
1 Start the WebSphere Server 4.0.
2 Start the WebSphere Server 4.0 console application (which youll find at
<ws4_ae home>\bin\adminclient.bat if youre running on Windows.)
3 When the console application appears, expand the tree on the left until you see the
Application servers node. Select this node.
4 In the panel on the right side of the console, click the JVM Settings tab. Click the
Advanced Settings button. (You might need to scroll the panel to see this button.)