Shame on me, but this happens. Ienter an endless loop and the whole computer is spinning off. If I kill the process, I'll lose unsaved changes. Is there any [poor] developer interrupt key to press to kill running scripts in ESTK2?
[Plus, I'd gladly see document recovery, oh well...]
I don't think you can stop a running JavaScript except by closing the application. What you can do is to add an artificial upper limit, so let's say you have a while loop,
while (condition) { /*do something*/ }
Then you can change it to:
var i=0;
while (condition && i<1000000) { /*do something*/; i++;}
if (i==1000000) { /* Present some error message */ }
It's not the best solution in the world, but it will at least guarantee that you won't get into an endless loop.
That's some workaround, thanks. Although I'd welcome an environment shortcut.
I found that when I'm testing a script for Adobe apps, it helps to have an alerts within such a loop. Even though one may call it a "crude debug", when a prompt comes up within Adobe app, I am able to switch to ESTK and press stop. That saves the butt too.