Ummm... debugging and error handling are two seperate things. And at the moment error handleing sucks with mIRC. But you should write your own debugger.
Basically rather than using a /debug command with filters, you specify what you want be shown while the /debug is active.
Of course you have to do this yourself. But it's really easy... that is for a basic debugger. This is all you need really...
alias /DEBUGMSG { if %isdebug { echo -a DEBUG - $1- } }
Then you simply place /debugmsg <string> in places where you'd like to see debug messages. You would then simply need to set %isdebug to 1 or 0 to toggle the displaying of debugstrings.
This is a REAL simple debugger. I myself wrote a complex debugger that allows limited filtering, line colors, etc. The problem is I think it uses some custom identifiers and i don't wanna replace those identifiers with the equivelent instructions cuz i am just too lazy. No one would use it if I posted it anyhow so why bother.