Re: BREAKing into Euphoria
- Posted by Al Getz <Xaxo at ?o?.com> Sep 12, 2007
- 1961 views
Andy Drummond wrote: > > I have a situation where sometimes a program goes off > into the wild blue yonder and I have no idea why. > Is there any way that a keypress like BREAK or SysReq > could be picked up by the interpreter and drop you into > the debug window? I agree that you'd need to enable this > so that nice distributed code couldn't get hacked, but > it seems as if it should be a pretty trivial addition to > the Euphoria interpreter itself. > Has anyone done this, or is there any reason why it is > not really practical? > Andy Hi Andy, If nothing else works, add a few enumerated printf statements that print to a debug file. Each printf should print at least a number like: printf(fn,"%d:",4) This way once you close the program you can go to the debug file and see where your program last encountered a printf statement like this. Of course you need to append the file rather than keep it open or some of your printf's wont printf. You could also try my EuDebug program that runs Eu programs in debug mode. It's a little dated already however so if you are using some more recently added Eu functions it may not work. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."