[REBOL] Re: How best to debug REBOL?
From: henrik:webz:dk at: 8-May-2004 12:46
Gregg Irwin wrote:
> Hi Tony,
> ABC> I'm sure this is an FAQ (so apologies in advance), but I haven't found an
> ABC> answer in any of the FAQs. Is there an interactive way of debugging
> ABC> REBOL, or any way beyond adding print statements?
> Check out the TRACE function. Be aware that it can produce *volumes*
> of output though.
> ABC> ...I would like to be able to step through the execution line by
> ABC> line and see what the values are at each stage.
> It might be possible to produce a step-trace mode for REBOL by using
> DO/NEXT, but there are going to be difficulties with any kind of
> debugger based on a "static code" model/mentality.
A very different approach which only works with View applications
certainly sped up bugfixing for me:
You can stop the program, either by pressing escape in the console or by
generating an error, change program code and start it again with
do-events. That's very handy, if you need to initialize something every
time you run your program. You don't spend time on that, and you can
focus on the bug.
I use a texteditor with my program code, and if you need to change a
function, just make the changes and paste it into the console. do-events
will start the program again.
It's not particularly revolutionary. I just tried it and found it to be
an incredible time saver. :-)
Henrik Mikael Kristensen