Re: request for 2.5

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:
> 
> On Thu, 14 Oct 2004 08:15:11 -0700, Robert Craig
> <guest at RapidEuphoria.com> wrote:
> 
> >Why would you want even finer control?.
> 1) There are *many* times when I study five or six lines in earnest,
> then hit return/downarrow a dozen or more times to get round to the
> next iteration. Disabling trace on the bottom half of a loop would
> often be very useful.
> 
> 2) I want to see _how_ a routine is called, not what it does. eg:
> 
> function getSet(object Type)
> 
> 	trace(1)
> 	<some line that the debugger will pause on>
> 	without trace
> 	<rest of routine>
> end function
> 
> It is quite common that the bug is not in the routine, but how it is
> called, or how the (valid) results are being handled.
> 
> What would be nice is F9 to run to the end of the current routine. 
> 
> 2) I've entered a routine I'm not interested in, eg
> 
> 	Update(All,getSet(Type))
> 
> Now, I want to see what happens in Update, but I don't want to run
> through what getSet() is doing. Maybe I could without trace around the
> getSet routine, maybe sometime later I will want to trace through it.
> Maybe I've already spent five minutes in the debugger.
> One thing that would be nice is F10 to simply switch off all tracing
> of the current routine, for this session. To make that permanent, then
> obviously I put without trace/with trace around that routine, before I
> next run the program. If it is easier for F10 to switch off just the
> current line, that would be good too. Maybe a small undo buffer, but
> otherwise once it is switched off, that's it this session.
> I'm sure you understand that trace(1) at the start of Update() might
> trigger thousands of times before the point of interest, and indeed
> that some of the variables I want to test might be out of scope.

Not trying to get picky, but what you've described would be more like
enhancements to the debugger rather than trace(). The trace() call just
starts the debugger running, it doesn't control what goes on once it 
has started.

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") )


-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu