IanM's Matrix1 plugin set contains some dead handy commands for logging stuff either to a console window, or to a log file.
I had to do this recently when I discovered that the
system dmem available command didn't seem to work anymore.
Basically, I just printed a line to the console window after every few lines of code saying which bit had just been run.
Soon found the offending command, but now I have to wait for Lee to fix it before I can finish my hardware reporting function.
>Edit<
Forgot to say, I didn't even realise DBP had a debugger, lol