I am trying to debug JavaScript that is stored in the JCR and run on the server with Rhino, by the Sightly templating language's JavaScript UseAPI.
As per the instructions provided in sling.properties:
# To enable the current server side debugging in the Rhino interpreter
# set the org.apache.sling.scripting.javascript.debug property to true.
# This will open a Swing window for Rhino JavaScript debugging on the
# server platform.
When I do this, I can see the Swing window for Rhino. However, if I try to set a breakpoint on a JavaScript file, or trigger the debugger by adding a debugger;
line, the debugger breaks but does not show me the correct file.
Similarly, if I select 'Break on function enter' from the Debug menu, the debugger will break but using 'Step Into/Over/Out' seems to jump to random points in the code.
Is this working for anyone else? I'm using v2.0.14 of org.apache.sling.scripting.javascript which seems to be the latest.