When running invalid JS code in a RunJavaScript node, the platform should log an error

By Daniel Luz on 3 Jun 2016
Whenever someone runs invalid JS code via RunJavaScript action, the failure is silent because the platform catches the exception and doesn't log anything.
This makes debugging unnecessarily complex. When the page's JS is not working as expected and you have no clue why we need to set the browser debugger to break on caught exceptions and patiently step through all of them to find something that seems familiar.
If you have some idea that the problem is in that JS code, you're still forced to do weird things like use debugger instructions or resort to printf debugging using console.log.

Ideally, the platform would log the error in Service Center. If that's too much work, at least a console.log where we can see the offending code.
Kilian Hekhuis21 Jun 2016
The problem being that the error occurs inside your browser, not on the server, so it's a bit difficult to log anything there.