# How Do I: Debug an Application?

If you are having trouble figuring out why your application 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 an application in WebLogic Workshop, you are debugging the application as it is deployed on your development server.

To Start the Debugger

1. In the source view, position the cursor on a line where you wish to break.
2. From the Debug menu, choose Toggle Breakpoint. A red circle appears at the left edge of the line.

   Note: You can quickly clear a breakpoint by clicking the red circle and you can quickly set a breakpoint by clicking anywhere in the left edge of a line.

3. From the Debug menu, choose Start. WebLogic Workshop builds the file and opens the Workshop Test Browser.
4. Invoke a method by supplying any necessary parameters and clicking the button showing the method's name.

   When the line on which you have set a breakpoint is run, the web service pauses and you are returned to the source view of the WebLogic Workshop at the breakpoint. Now you can step through the code, using the Continue, Step Over, Step Into, and Step Out commands from the Debug menu. You may inspect and change the values of variables that are currently defined and see the call stack by using the debug windows available on the View menu.

To learn more about debugging with WebLogic Workshop, see Debugging Your Application.

Related Topics

Debugging Your Application