JavaScript Editor

From Apache OpenOffice Wiki
Jump to: navigation, search

Clicking the Edit button in the JavaScript Organizer will open the Rhino JavaScript Debugger:

JavaScript Debugger

The source of the JavaScript macro is displayed in the main window. The line numbers are shown in the left-hand sidebar. Clicking in the sidebar will set and remove breakpoints in the macro. There is currently a bug in the debugger which is not clearing the symbol in the sidebar when breakpoints are removed.

The contents of the text window can be saved by selecting the File > Save menu item. The macro can be run by selecting the File > Run menu item. This activates the four buttons above the main text window:

  • Break
Sets a breakpoint at the line where the cursor is.
  • Go
Runs the macro, stopping at the next breakpoint (if one is set).
  • Step Into
Runs a single line of code, stepping into functions if they exist and then stop.
  • Step Over
Runs a single line of code, without stepping into functions and then stop.
  • Step Out
Continues the execution of the macro until it exits the current function.

There are two other panes in the debugger which are hidden by default. These allow the developer to view the stack and watch variables:

JavaScript Debugger with Stack and Watch tabs displayed

For more information on the Rhino JavaScript Debugger see

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages