Debugging Server Side JavaScript
It is important to understand that Adobe uses open source Rhino to convert JavaScript into Java. Therefore all the regular Java libraries are available to Server Side JavaScript simply be using the class path in your JavaScript. However, Server Side JavaScript is slower than using Java. It is best to use Server Side JavaScript if components will be cached in the dispatcher.
In order to enable the server side debugging for Rhino, open the sling.properties file in crx-quickstart/conf and set the org.apache.sling.scripting.javascript.debug to true.
This will open up a Swing window for Rhino and you should be able to debug your code using breakpoints etc.
Let us know if you need further information.
Thank you
