eric6/DebugClients/Python/DebugClientBase.py

changeset 7406
f72dfec31dcb
parent 7360
9190402e4505
child 7415
e953b2a449a9
child 7423
9758025d7225
equal deleted inserted replaced
7401:cbdcfbcbc0fb 7406:f72dfec31dcb
2051 # we report on all unhandled exceptions 2051 # we report on all unhandled exceptions
2052 sys.excepthook = self.__unhandled_exception 2052 sys.excepthook = self.__unhandled_exception
2053 self.__interceptSignals() 2053 self.__interceptSignals()
2054 2054
2055 # This will eventually enter a local event loop. 2055 # This will eventually enter a local event loop.
2056 # Note the use of backquotes to cause a repr of self.running. The
2057 # need for this is on Windows os where backslash is the path separator.
2058 # They will get inadvertantly stripped away during the eval causing
2059 # IOErrors if self.running is passed as a normal str.
2060 self.debugMod.__dict__['__file__'] = self.running 2056 self.debugMod.__dict__['__file__'] = self.running
2061 sys.modules['__main__'] = self.debugMod 2057 sys.modules['__main__'] = self.debugMod
2062 res = self.mainThread.run( 2058 code = self.__compileFileSource(self.running)
2063 'exec(open(' + repr(self.running) + ').read())', 2059 if code:
2064 self.debugMod.__dict__) 2060 res = self.mainThread.run(code, self.debugMod.__dict__, debug=True)
2065 self.progTerminated(res) 2061 self.progTerminated(res)
2062 else:
2063 self.progTerminated(42) # should not happen
2066 2064
2067 def run_call(self, scriptname, func, *args): 2065 def run_call(self, scriptname, func, *args):
2068 """ 2066 """
2069 Public method used to start the remote debugger and call a function. 2067 Public method used to start the remote debugger and call a function.
2070 2068

eric ide

mercurial