How Do I: Debug a Web Service?

If you are having trouble figuring out why the web service you have written is not working, you can use the debugger to step through your source code line-by-line and locate the problem. The debugger allows you to set breakpoints, step through your code line-by-line, view local variables, set watches on variables and expressions, and view the call stack and exception information. Note that when you debug a service in WebLogic Workshop, you are debugging the service as it is deployed on your development server.

To Start the Debugger

1. Position the cursor on a line where you wish to break, click the Debug menu, then click Toggle Breakpoint.

Note: When you toggle a breakpoint you should see a red circle appear on the left edge of the Source View. You may quickly set and clear breakpoints by clicking where you see this circle.

2. Click the Debug menu, then click Start and Debug.

This will launch a browser as if you had clicked Start, except that the service will be running in debug mode. You should see the Debug Window appear at the bottom of the Source View in WebLogic Workshop.

3. Switch to the browser and invoke a method.

When the line on which you have set a breakpoint is run, the web service will be paused and you will be able to step through the service's code one line at a time. You may inspect and change the values of variables that are currently defined and see the call stack by using the Debug Window.

To learn more about debugging with WebLogic Workshop, see Debugging Web Services.

Related Topics

Source View