code: def dmp(self, thing):
          
  
          def safe_getattr(key):
              """Avoid crash on getattr"""
              try:
                  return getattr(thing, key)
              except Exception as e:
                  return 'Error getting attr "%s" from "%s" (%s: %s)' % (
                      key, thing, type(e).__name__, e
                  )
  
          return dict((
              escape(key), {
                  'val': self.safe_better_repr(safe_getattr(key)),
                  'type': type(safe_getattr(key)).__name__
              }
          ) for key in dir(thing))
docs: Dump the content of an object in a dict for wdb.js