Debugging & Tracing
rwab1 at cam.sri.com
Wed Aug 5 00:24:29 AEST 1998
[can't remember if I've brought this up before - memory of a
When debugging programs it would be handy to be able to show debugging and
tracing information (to stderr), even inside non-deterministic
procedures (isn't there a quote to the effect that printf is the best
debugging tool in the programmers' armoury?)
This is esp. true when you don't have SICStus/NuProlog to hand or are
using the more advanced Mercury features. It may even be the case
when the native debugger arrives.
Now, I appreciate that such a thing would be wide open to massive
abuse, but I wonder whether such a facility should be included in the
Mercury library? I certainly think I'd find it handy. Perhaps the
Mercury compiler could have debugging grades and these naughty tracing
procedures would be compiled away in non-debugging grades. It seems
it should be fairly easy to do such a thing given the C interface (at
the risk of possibly buggering up legitimate output to stderr).
Any support? Or is this too horrible for words? Or is it already in
there and I haven't searched deeply enough?
Ralph Becket | rwab1 at cam.sri.com | http://www.cam.sri.com/people/becket.html
More information about the users