Page 1 of 1

Terminating code execution

Posted: 07 Feb 2020 23:41
by Mark1834
Apologies for the basic question, but is there any way to terminate plugin execution if it gets into an infinite loop or while paused displaying a message box? I've tried all the usual <ESC>, <ctrl>c, <ctrl><alt><del> etc, but nothing seems to work.

I can always bring up Task Manager to kill FH altogether, but that's a bit drastic.

Re: Terminating code execution

Posted: 08 Feb 2020 09:39
by Jane
Assuming you are running with the code editor open, try Debug>Stop Debugging from the menu.

If it's a iup message box it's best to close the message box first.

Re: Terminating code execution

Posted: 08 Feb 2020 09:46
by Mark1834
Thanks Jane - unfortunately that doesn't work, as the Message Box is a modal window that disables all other interaction with FH.

Re: Terminating code execution

Posted: 08 Feb 2020 09:48
by Mark1834
Perhaps it just needs the discipline to insert a break point just after the message box during testing if you think it likely you'd want to stop execution at this point.

Re: Terminating code execution

Posted: 08 Feb 2020 11:21
by tatewise
I often encounter similar problems and have to resort to Task Manager.
So, yes, it is a matter of inserting break points judiciously, or designing 'infinite' loops to have some escape criteria even if it is only while debugging.