Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Debugging Server side javascript breaks the site

Avatar

Level 1

When I enable server side debugging by setting org.apache.sling.scripting.javascript.debug=true. I get the following error message when I try to access my page. See image for error.

Can anyone please advise on how to properly debug server side javascript. Many Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

There are no tools for efficient JavaScript debugging in Sling / AEM . What you mentioned to be used is the Sling JavaScript debugger that still an alpha tool available for ECMA / ESP scripts used for rendering components.  Also we did not documented in our pages if you have seen that in our official documentation pages please provide the link will get the document fixed. 

View solution in original post

5 Replies

Avatar

Level 10

I guess you can easily use logger in sightly JS file like log.info("Hello info log");

is this what you are referring?

Avatar

Level 10

Hi,

 can you please refer where are you exactly setting org.apache.sling.scripting.javascript.debug = true

Avatar

Level 1

In the sling.properties file located under crx-quickstart/conf directory.

Avatar

Level 10

Thanks

I am able to replicate this, I am looking into it.

It could be a bug as well, Meanwhile please raise a day care ticket with adobe.

Avatar

Correct answer by
Level 10

There are no tools for efficient JavaScript debugging in Sling / AEM . What you mentioned to be used is the Sling JavaScript debugger that still an alpha tool available for ECMA / ESP scripts used for rendering components.  Also we did not documented in our pages if you have seen that in our official documentation pages please provide the link will get the document fixed.