How To
Archived
How do I debug server-side JavaScript code in OpenIDM 4.x?
The purpose of this article is to provide information on debugging server-side JavaScript® code in OpenIDM using Eclipse® IDE for Java EE developers. Debugging JavaScript code can help you troubleshoot issues with your code that cannot be resolved by adding logging to your scripts.
2 readers recommend this article
Archived
This article has been archived and is no longer maintained by ForgeRock.
Debugging JavaScript code
Note
JavaScript debugging is only supported with Eclipse Luna; the more recent releases are not supported.
To configure JavaScript debugging via Eclipse:
- Download the Java EE version of Eclipse Luna from the Eclipse Downloads page.
- Back up and delete the following files from the /path/to/openidm/bundle directory:
- rhino.debugger-1.0.300.v201109150503.jar
- transport-1.0.100.v201109150330.jar
- Copy the following files from the Eclipse plugins directory to the /path/to/openidm/bundle directory:
- org.eclipse.wst.jsdt.debug.rhino.debugger_1.0.400.v201402051800.jar
- org.eclipse.wst.jsdt.debug.transport_1.0.200.v201402051800.jar
- Delete the contents of the /path/to/openidm/felix-cache directory.
- Edit the script.json file (located in the /path/to/openidm/project/conf directory) and uncomment the following line: "javascript.debug" : "transport=socket,suspend=y,address=9888,trace=true",
- Start Eclipse and create a new JavaScript Project.
- Select JavaScript > Include Path > Source within the Project Properties and add a link to the folder(s) containing the JavaScript files you want to debug via the Link External Folder... button.
- Start the OpenIDM instance.
- Attach the debugger to OpenIDM via the Run > Debug Configurations... menu item in Eclipse.
See Also
How do I add logging to JavaScript files in IDM (All versions)?
Customizing Java Log Format to use SimpleFormatter fails in IDM (All versions)
Related Training
N/A
Related Issue Tracker IDs
N/A