From: NadCixelsyd on 6 Jun 2010 21:50 During development, I have inadvertently written an infinite loop on many occasions. I have to terminate the entire application and insert breaks in various places until I find the loop. This sometimes takes upwards of an hour as I have no idea which subroutine contains the loop. Is there a way to terminate an infinite loop without canceling the entire VB session (and find out at least what subroutine I'm in). Can one limit CPU to (for example) 5 seconds and then break?
From: David Kaye on 7 Jun 2010 03:39 NadCixelsyd <nadcixelsyd(a)aol.com> wrote: >During development, I have inadvertently written an infinite loop on >many occasions. I have to terminate the entire application and insert >breaks in various places until I find the loop. You can't just hit Ctrl-Break? Works for me.
From: NadCixelsyd on 7 Jun 2010 09:43 On Jun 7, 7:39 am, sfdavidka...(a)yahoo.com (David Kaye) wrote: > NadCixelsyd <nadcixel...(a)aol.com> wrote: > >During development, I have inadvertently written an infinite loop on > >many occasions. I have to terminate the entire application and insert > >breaks in various places until I find the loop. > > You can't just hit Ctrl-Break? Works for me. [sarcasm on] Well, yeah, if your want the EASY way [sarcasm off] I've been hitting break to no avail. It never occurred to me to hit ctrl-break. Merci beaucoup and a hat-tip for the education.
From: Dee Earley on 7 Jun 2010 10:54 On 07/06/2010 14:43, NadCixelsyd wrote: > On Jun 7, 7:39 am, sfdavidka...(a)yahoo.com (David Kaye) wrote: >> NadCixelsyd<nadcixel...(a)aol.com> wrote: >>> During development, I have inadvertently written an infinite loop on >>> many occasions. I have to terminate the entire application and insert >>> breaks in various places until I find the loop. >> >> You can't just hit Ctrl-Break? Works for me. > > [sarcasm on] Well, yeah, if your want the EASY way [sarcasm off] > > I've been hitting break to no avail. It never occurred to me to hit > ctrl-break. Merci beaucoup and a hat-tip for the education. Also note that the Stop button does the same, but requires a DoEvents in the loop to process the click event. A key press is specially while in the IDE. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
From: Bob Butler on 7 Jun 2010 12:37
"Dee Earley" <dee.earley(a)icode.co.uk> wrote in message news:O9f7dFlBLHA.4584(a)TK2MSFTNGP06.phx.gbl... > On 07/06/2010 14:43, NadCixelsyd wrote: >> On Jun 7, 7:39 am, sfdavidka...(a)yahoo.com (David Kaye) wrote: >>> NadCixelsyd<nadcixel...(a)aol.com> wrote: >>>> During development, I have inadvertently written an infinite loop on >>>> many occasions. I have to terminate the entire application and insert >>>> breaks in various places until I find the loop. >>> >>> You can't just hit Ctrl-Break? Works for me. >> >> [sarcasm on] Well, yeah, if your want the EASY way [sarcasm off] >> >> I've been hitting break to no avail. It never occurred to me to hit >> ctrl-break. Merci beaucoup and a hat-tip for the education. > > Also note that the Stop button does the same, but requires a DoEvents in > the loop to process the click event. No, the Pause button is the same as ctrl-break. The Stop button is the same as "END" and is generally best avoided. |