code: def runcode(self, code):
          
          try:
              Exec(code, self.frame.f_globals, self.frame.f_locals)
              pydevd_save_locals.save_locals(self.frame)
          except SystemExit:
              raise
          except:
              # In case sys.excepthook called, use original excepthook #PyDev-877: Debug console freezes with Python 3.5+
              # (showtraceback does it on python 3.5 onwards)
              sys.excepthook = sys.__excepthook__
              try:
                  self.showtraceback()
              finally:
                  sys.__excepthook__ = sys.excepthook
docs: Execute a code object.
  
          When an exception occurs, self.showtraceback() is called to
          display a traceback.  All exceptions are caught except
          SystemExit, which is reraised.
  
          A note about KeyboardInterrupt: this exception may occur
          elsewhere in this code, and may not always be caught.  The
          caller should be prepared to deal with it.