Skip to content

Add an option to skip collect_extra_debug_data() #1620

@jlu5

Description

@jlu5

I find this way too verbose to be useful. Showing all variables is useful on small functions, but often times the traceback will start printing all variables in a plugin class, which buries the actual exception traceback in hundreds of lines:

Frame load in /opt/limnoria-venv/lib/python3.11/site-packages/supybot/plugins/Owner/plugin.py at line 619
-snip-
                self.__dir__ = <built-in method __dir__ of Owner object at 0x7fc7a52ef150>
                self.__doc__ = 'Owner-only commands for core Supybot. This is a core Supybot module\n    that should not be removed!'
                 self.__eq__ = <method-wrapper '__eq__' of Owner object at 0x7fc7a52ef150>
         self.__firewalled__ = {'isCommand': None, '_callCommand': None}
             self.__format__ = <built-in method __format__ of Owner object at 0x7fc7a52ef150>
                 self.__ge__ = <method-wrapper '__ge__' of Owner object at 0x7fc7a52ef150>
        self.__getattribute__ = <method-wrapper '__getattribute__' of Owner object at 0x7fc7a52ef150>
           self.__getstate__ = <built-in method __getstate__ of Owner object at 0x7fc7a52ef150>
                 self.__gt__ = <method-wrapper '__gt__' of Owner object at 0x7fc7a52ef150>
               self.__hash__ = <method-wrapper '__hash__' of Owner object at 0x7fc7a52ef150>
               self.__init__ = <bound method MetaSynchronized.__new__.<locals>.__init__ of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
        self.__init_subclass__ = <built-in method __init_subclass__ of MetaSynchronizedAndFirewalled object at 0x2008bba0>
                 self.__le__ = <method-wrapper '__le__' of Owner object at 0x7fc7a52ef150>
                 self.__lt__ = <method-wrapper '__lt__' of Owner object at 0x7fc7a52ef150>
-snip-
                  self.do422 = <bound method Owner.do376 of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
                self.doBatch = <bound method Owner.doBatch of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
              self.doPrivmsg = <bound method Owner.doPrivmsg of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
            self.echoMessage = False
           self.echo_message = False
                 self.enable = <bound method _wrap.<locals>.newf of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
                  self.flush = <bound method _wrap.<locals>.newf of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
             self.getCommand = <bound method Commands.getCommand of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
         self.getCommandHelp = <bound method Commands.getCommandHelp of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
        self.getCommandMethod = <bound method Commands.getCommandMethod of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
          self.getPluginHelp = <bound method PluginMixin.getPluginHelp of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
               self.inFilter = <bound method firewall.<locals>.m of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
               self.ircquote = <bound method _wrap.<locals>.newf of <Owner Owner <Owner.plugin.Owner object at 0x7fc7a52ef150>>>
-snip-

Maybe we can just focus on locals and skip class level variables?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions