User Tools

Site Tools


debug.irc

# $EPIC: debug.irc.txt,v 1.2 2006/07/26 19:47:17 sthalik Exp $

Synopsis:

load debug.irc
debug_section
debug_endsection

Description:

This script provides an example of how to effectively debug sections of code in large scripts, or while other scripts are loaded. It consists of two aliases, which are inserted into the code to be debugged to turn debugging on/off where needed.

Usage:

Place the debug_section command inside the alias or hook you wish to debug, just before the code to be debugged (note that if placed outside of an alias or hook, it will only debug the LOADING of that hook, which probably isnt what you want.)

Place the debug_endsection command at the end of the section to be debugged.

Files:

Logging is switched to the file epic.dbg in the current directory while debugging is active. The state of logging is restored to as it was before debugging was started.

Bugs:

Switching logfiles while the debugging script is inside a section being debugged won't work, the debugger will reset to the logging state at the point where the debugging routine was called.

debug.irc.txt · Last modified: 2006/07/28 04:10 (external edit)