i dont know exactly why, but the debug component isn't loaded at that position.
try inserting :
$g_dbg = isys_debugger::get();
before line 85 ($g_dbg->handle(isys_debugger::c_err_debug, "Connection closed (" . $this->m_db_name . ").");)