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.
Procedure
- 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.
- Exit Notes® and Domino® Designer, or shut down
the Domino® server, as appropriate,
on the run-time machine.
- Add the following lines to the
notes.ini
file:
JavaEnableDebug=1
JavaDebugOptions=transport=dt_socket,server=y,suspend=n,address=8000
JavascriptEnableDebug=1
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.
- 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.
- In Domino® Designer,
create a debug configuration as follows:
- Click the Debug IBM Domino Designer Server-Side
JavaScript toolbar button (a blue bug) and select Manage
Debug Configurations.
The Debug Configurations
dialog
appears.
- For
Name
, enter a unique name of your
choice.
- For
Host
, enter the address of the
run-time machine, for example, http://myserver.ibm.com
.
Specify localhost
if you are previewing.
- For
Port
, enter the socket number specified
in the notes.ini
file.
- 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.
- Click Apply.
You can close the dialog or immediately connect the debugger
(next step).
- Connect the debugger as follows:
- 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.
- If the
Debug Configurations
dialog
is open, ensure the correct configuration is selected and click Debug.
- 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.
- When you start debugging, you are placed in the debug perspective.
To return to the Domino® Designer
perspective, click .
- When you finish debugging, use the Terminate toolbar
button to disconnect from the debugger.