2
我试图调试存储在JCR中的JavaScript,并通过Sightly模板语言的JavaScript UseAPI在Rhino上运行服务器。Debug Sling/Sightly服务器端JavaScript
按在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.
当我这样做,我可以看到犀牛了Swing窗口。但是,如果我尝试在JavaScript文件上设置断点,或者通过添加debugger;
行来触发调试器,则调试器会中断,但不会显示正确的文件。同样,如果我从Debug菜单中选择'Break on function enter',调试器将会中断,但是使用'Step Into/Over/Out'似乎会跳到代码中的随机点。
这是否适用于其他人?我正在使用org.apache.sling.scripting.javascript的v2.0.14,这似乎是最新的。
如何设置组织.apache.sling.scripting.javascript.debug为true?这是在Web控制台?谢谢。 – Sid
您需要编辑您的AEM实例的sling.properties文件 –
您是否找到了用于调试javascript后端的解决方案? –