When you start with ARexx the first time you'll soon encounter the problem of
finding errors. (erm, no , the errors will find YOU
)
The script stops on any error and you won't see anything useful
Debug Mode
To enable debugging, put Trace('R') right after the first comment in your ARexx
script to see result values or use any other option that suits you
(e.g. Trace('A') for All)
Before starting your script call 'TCO' from command line or command input
(right Amiga + e). 'TCO' (short for TraCeOutput) resides in 'sys:rexxc'
To close console call 'TCC' (abbr. for TraCeClose).
There are 2 more commands and they come very handy when debugging is not need
all the time.
TS - starts tracing
TE - ends tracing
While hunting bugs, it might be a good idea to use 'say' command for testing.
If you doubt a function to work as expected, put say infront. An output console (or shell) is required.
For DOpus you could abuse DOpus Command 'Verify' to pop up a requester.
Verify <symbol|string>
where <symbol> is your variable and <string> is a text in single quotes
like:
Verify 'Var item2= ' item2
Have fun with ARexx