Break out of infinite loop in JS when in run mode
March 10, 2016 12:00 AM
Hello
I have a javascript script. When testing in Run mode, I am sometimes caught in an infinite loop for some reason and cannot stop lectora or the run mode (at least I don't know how).
I can kill Lectora but that is not a good option. Is there a way of stopping Lectora from running in these circumstances without having to restart it?
Thanks
Andrew
Discussion (2)
Yep - thanks - it is just that in some authoring systems I have used in the past there was way to force a stop - but then they were not using JS.
chers
undefined
An infinite JS look will always hang browser. In Chrome, you can usually kill one tab out of many, but in Lectora you have to kill the whole thing. If this is the script you developed, add a loop counter to it that breaks the cycle when counter equals 1000 or similar.
Discussions have been disabled for this post