Re: request for 2.5
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Oct 15, 2004
- 480 views
On Thu, 14 Oct 2004 17:56:26 -0700, Derek Parnell <guest at RapidEuphoria.com> wrote: >Not trying to get picky, but what you've described would be more like >enhancements to the debugger rather than trace(). True. >The trace() call just starts the debugger running, it doesn't control >what goes on once it has started. Hopefully being picky in an innoffensive way, actually, it does:
with trace integer i trace(1) i=1 trace(0) i=2 trace(1) i=3
The trace window jumps from line 5 (trace(0)) to line 8 (i=3). I have to admit that I cannot remember ever coding trace(0), but it would probably cure a lot of the problems I experience, thanks. I also have an idea which I'll post separately. > >I agree, and I think so does RDS, that the debugger can do with some >serious improvements. Hopefully once v2.5 is out the door, RDS can >start that process. > >But back to trace(). One technique I've used is a type of conditional >trace. This is where I start the debugger only when certain conditions >have been met. > >Eg.: > trace( (id = 17) and (length(fldx) > 0 ) ) > trace( equal(getenv("DEBUG"), "rtnx") ) Just a small note of caution: be careful that the expression always evaluates to 1 or 0. For example:
if index then -- ie index is not zero trace(1) else trace(0) end if
is not the same as trace(index), use trace(index!=0) instead. Regards, Pete