This page describes how to add a breakpoint to your JavaScript code for the Aptana JavaScript debugger.
Contents |
Introduction
Add a breakpoint to your JavaScript code to stop the execution of your script at that exact point. Using breakpoints can help you determine the current value or type of a variable at that moment, and other useful information.
You can either manually add a breakpoint to your code, or you can add an exception breakpoint to your code.
Instructions
Manually adding a breakpoint to your code
To manually add a breakpoint to your JavaScript code:
- Start the debugger and switch to the Aptana Debug perspective. (See Running the debugger if you need help.)
- Suspend the current JavaScript thread.
- Add a breakpoint to your code.
- Click the Resume button
to resume the execution of your code. Your code will be suspended again when execution hits the breakpoint that you set up.
Adding an exception breakpoint to your code
To add a breakpoint to your code so that execution automatically breaks on a certain type of exception:
- Open the file with your script in the appropriate Editor.
- From the Run menu, select Add JavaScript Exception Breakpoint... to open an Add JavaScript Exception Breakpoint pop-up window.
- On the Add JavaScript Exception Breakpoint pop-up window, select the type of exception that you would like to break on.
- Run the debugger (see Running the debugger) to debug your code.