View Single Post
Old 04 July 2015, 14:05   #5
BigFan
Registered User
 
BigFan's Avatar
 
Join Date: Feb 2014
Location: Germany
Posts: 261
ARexx Bug Killing

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

Last edited by BigFan; 05 July 2015 at 00:06. Reason: darn, i wrote tce instead of tcc .
BigFan is offline  
 
Page generated in 0.04925 seconds with 11 queries