Setting up and connecting the JavaScript debugger

These steps show you how to adjust the notes.ini file on the run-time machine, create a debug configuration in Domino® Designer, and connect the debugger.


  1. Adjust the notes.ini file for the run-time client or server. For previewing, this is the Domino Designer client. Otherwise it is the Domino server where the application runs.
    1. Exit Notes® and Domino Designer, or shut down the Domino server, as appropriate, on the run-time machine.
    2. Add the following lines to the notes.ini file:
      Your notes.ini file may already contain the first two lines if you debug Java™ code remotely. The address can be any free socket number on the run-time machine. Socket numbers in the range 8000 to 8999 are typically free.
    3. Start Notes, Domino Designer, or the Domino server, as appropriate.
    When JavascriptEnableDebug=1 is in effect, all JavaScript code runs in debug mode. Debug mode may degrade performance so you may want to change this setting for normal operations. When a server is running in debug mode, any client can attach to the server using a debugger. It is recommended to not start production systems or systems that contain sensitive data in debug mode due to the potential security risks.
  2. In Domino Designer, create a debug configuration as follows:
    1. Click the Debug IBM Domino Designer Server-Side JavaScript toolbar button (a blue bug) and select Manage Debug Configurations.
      The Debug Configurations dialog appears.
    2. For Name, enter a unique name of your choice.
    3. For Host, enter the address of the run-time machine, for example,
      Specify localhost if you are previewing.
    4. For Port, enter the socket number specified in the notes.ini file.
    5. Select Stop at first line of server-side JavaScript to force the debugger to stop when JavaScript code starts to run. You have two options:
      • Select All JavaScript to stop at Designer-generated JavaScript sections as well as user-contributed sections. This may be desirable for comprehension, but you cannot set breakpoints in Designer-generated JavaScript sections.
      • Select Design elements only to stop at user-contributed sections only.
      Stopping at the first line of each element is necessary if no breakpoints are set. If breakpoints are set, stopping at the first line of each element may be an encumbrance. See Running the JavaScript debugger for breakpoint instructions.
    6. Click Apply.
    You can close the dialog or immediately connect the debugger (next step).
  3. Connect the debugger as follows:
    1. If you are debugging on the Domino Designer client, preview a design element in a browser (not the Notes client).
      This starts the preview server on the local machine.
    2. If the Debug Configurations dialog is open, ensure the correct configuration is selected and click Debug.
    3. If the Debug Configurations dialog is not open, click the Debug Domino Designer JavaScript toolbar button and select the correct debug configuration.
    If an error occurs, for example, Failed to connect, check for the following problems: wrong server address; wrong socket number; preview server not running.
  4. When you start debugging, you are placed in the debug perspective. To return to the Domino Designer perspective, click Window > Open Perspective > Domino Designer.
  5. When you finish debugging, use the Terminate toolbar button to disconnect from the debugger.