Dan Sugalski <[EMAIL PROTECTED]> wrote: >>This allows for example to run all your code with fatal threshold and >>then, when running into sub-that-is-supposed-to-be-all-bugged, you just >>activate debug level, and return to fatal after leaving it. This way you >>only get the traces you wanted - instead of getting lost in your debug >>traces.
> Sounds like a job for pre and post handlers for subs and methods.... Pah. Sounds like a debug variable in the interpreter context (what we already have for errors and warnings - we might need a few more bits for level, though) and a bit more cleverness for the C<debug> opcode (which we have too). Said buggy sub starts with: debug 0 # turn off or - debug -1 ... reduce level Returning from the sub restores automagically the old debug level, because it's in the interpreter context. More advanced debugging stuff is library code IMHO, we should have all necessary hooks like asserts and tracebacks, though. Ah and the Parrot debugger needs a lot of work still. leo