Command to break while loop if stuck in a script

During development the abilty to stop a continously or sluggish script would be a nice feature. I have also gotten myself locked out a few times to my annoyance.

I agree the iteration counter limit from CPowell is the most expedient for most cases.

The problem you still have is if code hangs within an iteration - eg use of a blocking function…then both methods will fail to reach the while test and you are still stuck.

As a result graceful handling of inf loop condition would be useful.

1 Like