How best to debug REBOL?
[1/3] from: abcoates:TheOffice at: 1-May-2004 11:30
I'm sure this is an FAQ (so apologies in advance), but I haven't found an
answer in any of the FAQs. Is there an interactive way of debugging
REBOL, or any way beyond adding print statements? I'm trying to
understand the workings of the REBOL CGI scripts for a blog/weblog app
called "Vanilla", and I would like to be able to step through the
execution line by line and see what the values are at each stage.
So, if anyone can give me any pointers, I would be grateful. I'm just
concerned I've missed something painfully obvious. Thanks in advance,
Cheers,
Tony.
[2/3] from: greggirwin:mindspring at: 2-May-2004 10:15
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.
HTH!
-- Gregg
[3/3] 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
<<quoted lines omitted: 7>>
> 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. :-)
--
Regards,
Henrik Mikael Kristensen
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted