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 |