* Terminating code execution

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
Mark1834
Megastar
Posts: 2147
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Terminating code execution

Post by Mark1834 » 07 Feb 2020 23:41

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.
Mark Draper

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Terminating code execution

Post by Jane » 08 Feb 2020 09:39

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.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
Mark1834
Megastar
Posts: 2147
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Terminating code execution

Post by Mark1834 » 08 Feb 2020 09:46

Thanks Jane - unfortunately that doesn't work, as the Message Box is a modal window that disables all other interaction with FH.
Mark Draper

User avatar
Mark1834
Megastar
Posts: 2147
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Terminating code execution

Post by Mark1834 » 08 Feb 2020 09:48

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.
Mark Draper

User avatar
tatewise
Megastar
Posts: 27079
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Terminating code execution

Post by tatewise » 08 Feb 2020 11:21

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply