'Enable display of debugging messages while doing pattern matching.
Set C{flag} to True to enable, False to disable.'

def setDebug(self, flag=True):

    if flag:
        self.setDebugActions(_defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction)
    else:
        self.debug = False
    return self
