eric6/DebugClients/Python/DebugClientBase.py

branch
multi_processing
changeset 7421
4a9900aef04e
parent 7419
9c1163735448
child 7422
9a008ab4811b
equal deleted inserted replaced
7420:0d596bb4a60d 7421:4a9900aef04e
1500 if status is None: 1500 if status is None:
1501 status = 0 1501 status = 0
1502 elif not isinstance(status, int): 1502 elif not isinstance(status, int):
1503 message = str(status) 1503 message = str(status)
1504 status = 1 1504 status = 1
1505 1505 if message is None:
1506 message = ""
1507
1506 if self.running: 1508 if self.running:
1507 self.set_quit() 1509 self.set_quit()
1510 program = self.running
1508 self.running = None 1511 self.running = None
1509 self.sendJsonCommand("ResponseExit", { 1512 self.sendJsonCommand("ResponseExit", {
1510 "status": status, 1513 "status": status,
1511 "message": message, 1514 "message": message,
1515 "program": program,
1512 }) 1516 })
1513 1517
1514 # reset coding 1518 # reset coding
1515 self.__coding = self.defaultCoding 1519 self.__coding = self.defaultCoding
1516 1520
2162 code = self.__compileFileSource(self.running) 2166 code = self.__compileFileSource(self.running)
2163 if code: 2167 if code:
2164 res = self.mainThread.run(code, self.debugMod.__dict__, debug=True) 2168 res = self.mainThread.run(code, self.debugMod.__dict__, debug=True)
2165 else: 2169 else:
2166 res = 42 # should not happen 2170 res = 42 # should not happen
2167 self.progTerminated(res)
2168 return res 2171 return res
2169 2172
2170 def run_call(self, scriptname, func, *args): 2173 def run_call(self, scriptname, func, *args):
2171 """ 2174 """
2172 Public method used to start the remote debugger and call a function. 2175 Public method used to start the remote debugger and call a function.
2206 except Exception: 2209 except Exception:
2207 retryCount += 1 2210 retryCount += 1
2208 time.sleep(3) 2211 time.sleep(3)
2209 return None 2212 return None
2210 2213
2214 # TODO: add support for the '-m' python invocation => '--module'
2211 def main(self): 2215 def main(self):
2212 """ 2216 """
2213 Public method implementing the main method. 2217 Public method implementing the main method.
2214 """ 2218 """
2215 if '--' in sys.argv: 2219 if '--' in sys.argv:

eric ide

mercurial