OpenIDM includes Eclipse JSDT libraries so you can use Eclipse to debug your OpenIDM scripts during development.
Procedure 1. To Enable Debugging
Follow these steps to enable debugging using Eclipse.
-
Install the environment to support JavaScript development in either of the following ways.
-
Download and install Eclipse IDE for JavaScript Web Developers from the Eclipse download page.
-
Add JavaScript Development Tools to your existing Eclipse installation.
-
-
Create an empty JavaScript project called
External JavaScript Sourcein Eclipse.Eclipse then uses the
External JavaScript Sourcedirectory in the default workspace location to store sources that it downloads from OpenIDM. -
Stop OpenIDM.
-
Edit
openidm/conf/boot/boot.propertiesto enable debugging.-
Uncomment and edit the following line.
#openidm.script.javascript.debug=transport=socket,suspend=y,address=9888,trace=trueHere
suspend=yprevents OpenIDM from starting until the remote JavaScript debugger has connected. You might therefore choose to set this tosuspend=n. -
Uncomment and edit the following line.
#openidm.script.javascript.sources=/Eclipse/workspace/External JavaScript Source/Adjust
/Eclipse/workspace/External JavaScript Source/to match the absolute path to this folder including the trailing/character. On Windows, also use forward slashes, such asC:/Eclipse/workspace/External JavaScript Source/.Each time OpenIDM loads a new script, it then creates or overwrites the file in the
External JavaScript Sourcedirectory. Before toggling breakpoints, be sure to refresh the source manually in Eclipse so you have the latest version.
-
-
Prepare the Eclipse debugger to allow you to set breakpoints.
In the Eclipse Debug perspective, select the Breakpoints tab, and then click the Add Script Load Breakpoint icon to open the list of scripts.
In the Add Script Load Breakpoint window, select your scripts, and then click OK.
-
Start OpenIDM, and connect the debugger.
To create a new debug, configuration click Run > Debug Configurations... > Remote JavaScript > New button, and then set the port to 9888 as shown above.

