Break out of infinite loop in JS when in run mode

mlapl1 Community Member Posts: 349

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?




  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    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.
  • mlapl1
    mlapl1 Community Member Posts: 349
    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.