class_docstr: A debugging context manager.
  
  Without an active debugging context, devices will not save their internal state when
  encoutering Snapshot operations. The debugger also serves as storage for the device states.
  
  Args:
      dev (Device): device to attach the debugger to
code: def __init__(self, dev):
      # old device API: check if Snapshot is supported
      if (
          isinstance(dev, qml.Device)
          and "Snapshot" not in dev.operations
      ):
          raise DeviceError("Device does not support snapshots.")
  
      # new device API: check if it's the simulator device
      if isinstance(dev, qml.devices.Device) and not isinstance(
          dev, qml.devices.DefaultQubit
      ):
          raise DeviceError("Device does not support snapshots.")
  
      self.snapshots = {}
      self.active = False
      self.device = dev
      dev._debugger = self
  
imports: import pennylane
  from pennylane import DeviceError
label_desc: Use image node_id 1 to create a new _Debugger object  with example: obj = _Debugger(dev)