--- a/DebugClients/Python/DebugClientBase.py Tue Mar 26 19:39:42 2019 +0100 +++ b/DebugClients/Python/DebugClientBase.py Wed Mar 27 20:09:37 2019 +0100 @@ -907,6 +907,10 @@ else: self.cover = None + if params["debug"]: + Breakpoint.clear_all_breaks() + Watch.clear_all_watches() + self.sendJsonCommand("ResponseUTPrepared", { "count": self.test.countTestCases(), "exception": "", @@ -915,14 +919,27 @@ elif method == "RequestUTRun": from DCTestResult import DCTestResult - self.testResult = DCTestResult(self) + self.testResult = DCTestResult(self, params["failfast"]) if self.cover: self.cover.start() - self.test.run(self.testResult) + self.debugging = params["debug"] + if params["debug"]: + locals_ = locals() + self.threads.clear() + self.attachThread(mainThread=True) + sys.setprofile(None) + self.mainThread.run( + "result = self.test.run(self.testResult)\n", + localsDict=locals_) + result = locals_["result"] + else: + result = self.test.run(self.testResult) if self.cover: self.cover.stop() self.cover.save() - self.sendJsonCommand("ResponseUTFinished", {}) + self.sendJsonCommand("ResponseUTFinished", { + "status": 0 if result.wasSuccessful() else 1, + }) elif method == "RequestUTStop": self.testResult.stop()