The Eclipse Java debugger connects to the server where your
service runs, allowing you to step through the source code, investigate
variables and the stack, just as if you were debugging a local Java class.
Prerequisites
Before beginning the debug process, verify that your Java service
compiled successfully, and there are no errors.
- Create a test
client to invoke the service methods using the Web Service Client wizard:
- Select
from the main menu bar.
- Select
from the Service Selection page and click
Next.
- Select
Create Web Service Client Wizard from the
Wizard Selection page and click
Next.
- Follow
the instructions in the wizard to create the Web service client.
- Do one of the
following:
Option |
Action |
If the service is not deployed to the server that
you want to debug against
|
Create a service package and deploy it
|
If the service is deployed |
Ensure the deployed implementation matches the source that
you are debugging against. Redeploy if you modified the source.
|
- To configure the
EAServer runtime that hosts your service to support remote debugging using the
Java Platform Debug Architecture (JPDA) interface, select one of the
following:
- If deploying to
Service Container, follow the instructions in Running the Service Container Server in Java Debug Mode.
- If deploying to the
EAServer Web services toolkit:
- Start
EAServer Manager and connect to the server.
- To
display the server properties, on the Java Debug tab, select
Use JPDA and enter the number of a free
port for the JPDA connection.
- Restart
the server in debug mode.
For more details, see the
EAServer documentation located at the
main level of the Sybase WorkSpace online bookshelf. If this server
documentation is not installed, the documentation is available on the Sybase
Product Manuals Web site at
http://sybooks.sybase.com.
- In Eclipse, create
a Remote Java Application configuration to connect to the runtime server that
hosts your service:
- Switch to
the Java or Debug perspective.
- Select
from the main menu bar.
- Select
Remote Java Application and click
New.
- Configure
the following settings on the
Connect tab:
- Name – specify
a name for the configuration.
-
Project – select the project that
contains the source for your service.
- Connection type
– select
Standard (Socket Attach).
- Host – enter
the host or IP address for the EAServer connection.
- Port – enter
the EAServer JPDA port.
Leave other settings at their default values.
- Click
Debug to close the Debug dialog and start
the debugging session.
The debugging session remains inactive until you run a test
that executes a breakpoint in your service implementation.
- To set breakpoints
using the Java source editor or the Source page in the Java Service editor,
directly to the left of the line where you want to add the breakpoint,
right-click the marker bar (vertical ruler) and select
Toggle Breakpoint.
A new breakpoint marker appears on the marker bar, directly to the
left of the line where you added the breakpoint. For more details on
configuring breakpoints, see the
Java Development User Guide.
- To remove a
breakpoint, right-click on the breakpoint marker and select
Toggle Breakpoint.
- Run the test
client.
When a breakpoint in the Java Service source is reached, Eclipse
activates a remote debugging session, switching the to the Debug perspective
where you can step through the code, investigate the stack, inspect variables,
and so forth. For details on using the debugger, see the
Java Development User Guide.
Send your feedback on this help topic to Sybase Technical Publications:
pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc.
For product-related issues or technical support, contact Sybase Technical Support
at 1-800-8SYBASE.