code: def set_spyder_breakpoints(self, force=False):
          
          if self._reading or force:
              breakpoints_dict = CONF.get('run', 'breakpoints', {})
  
              # We need to enclose pickled values in a list to be able to
              # send them to the kernel in Python 2
              serialiazed_breakpoints = [pickle.dumps(breakpoints_dict,
                                                      protocol=PICKLE_PROTOCOL)]
              breakpoints = to_text_string(serialiazed_breakpoints)
  
              cmd = u"!get_ipython().kernel._set_spyder_breakpoints({})"
              self.kernel_client.input(cmd.format(breakpoints))
docs: Set Spyder breakpoints into a debugging session