Hi Sander,
Yes, PixInsight's JavaScript runtime uses Mozilla's SpiderMonkey engine. SM does include a debugger. Here is the source code repository of Mozilla's JavaScript engine:
http://hg.mozilla.org/mozilla-central/file/f8d2c6f4631d/js
The debugger is on the jsd directory. This debugger is a bit old but perfectly usable. The problem is in integrating the debugger with PJSR and the core application's GUI. These are not trivial tasks by no means, and I obviously have other development priorities ?well, a mountain of them to be more precse!
Another possibility is changing the JavaScript engine. Mozilla's engine is fine, but I am a bit tired of their "peculiar" development rhythm and criteria. An alternative would be Apple's JavaScriptCore, or even SquirrelFish, which is the direct competitor to Mozilla's TraceMonkey. Next year I have to make many important decisions regarding future PI development, and this is one of them for sure.
In the meanwhile, don't let the lack of a debugger stop you from getting into PJSR development. Sophisticated scripts can be developed, as we have demonstrated (and will demonstrate; wait to see the image calibration script). It's just a matter of some experience and more structured work. I think it is always worth the effort, and it's funny anyway