244 return self.trace_dispatch |
244 return self.trace_dispatch |
245 if event == 'c_exception': |
245 if event == 'c_exception': |
246 return self.trace_dispatch |
246 return self.trace_dispatch |
247 if event == 'c_return': |
247 if event == 'c_return': |
248 return self.trace_dispatch |
248 return self.trace_dispatch |
249 print('DebugBase.trace_dispatch: unknown debugging event: ', # __IGNORE_WARNING__ |
249 print('DebugBase.trace_dispatch:' # __IGNORE_WARNING__ |
|
250 ' unknown debugging event: ', |
250 repr(event)) |
251 repr(event)) |
251 return self.trace_dispatch |
252 return self.trace_dispatch |
252 |
253 |
253 def dispatch_line(self, frame): |
254 def dispatch_line(self, frame): |
254 """ |
255 """ |
705 |
706 |
706 if exctype in [SystemExit, bdb.BdbQuit]: |
707 if exctype in [SystemExit, bdb.BdbQuit]: |
707 atexit._run_exitfuncs() |
708 atexit._run_exitfuncs() |
708 if excval is None: |
709 if excval is None: |
709 excval = 0 |
710 excval = 0 |
|
711 message = "" |
710 elif isinstance(excval, str): |
712 elif isinstance(excval, str): |
711 self._dbgClient.write(excval) |
|
712 excval = 1 |
713 excval = 1 |
|
714 message = excval |
713 elif isinstance(excval, bytes): |
715 elif isinstance(excval, bytes): |
714 self._dbgClient.write(excval.decode()) |
|
715 excval = 1 |
716 excval = 1 |
|
717 message = excval.decode() |
716 if isinstance(excval, int): |
718 if isinstance(excval, int): |
717 self._dbgClient.progTerminated(excval) |
719 self._dbgClient.progTerminated(excval, message) |
718 else: |
720 else: |
719 self._dbgClient.progTerminated(excval.code) |
721 self._dbgClient.progTerminated(excval.code, "") |
720 return |
722 return |
721 |
723 |
722 if exctype in [SyntaxError, IndentationError]: |
724 if exctype in [SyntaxError, IndentationError]: |
723 try: |
725 try: |
724 message = str(excval) |
726 message = str(excval) |
867 |
869 |
868 #XXX - think of a better way to do this. It's only a convenience for |
870 #XXX - think of a better way to do this. It's only a convenience for |
869 #debugging the debugger - when the debugger code is in the current |
871 #debugging the debugger - when the debugger code is in the current |
870 #directory. |
872 #directory. |
871 if os.path.basename(fn) in [ |
873 if os.path.basename(fn) in [ |
872 'AsyncFile.py', 'AsyncIO.py', |
874 'AsyncFile.py', 'DCTestResult.py', |
873 'DebugConfig.py', 'DCTestResult.py', |
875 'DebugBase.py', 'DebugClient.py', |
874 'DebugBase.py', 'DebugClientBase.py', |
876 'DebugClientBase.py', |
875 'DebugClientCapabilities.py', 'DebugClient.py', |
877 'DebugClientCapabilities.py', |
876 'DebugClientThreads.py', 'DebugProtocol.py', |
878 'DebugClientThreads.py', |
877 'DebugThread.py', 'FlexCompleter.py', |
879 'DebugConfig.py', 'DebugThread.py', |
|
880 'DebugUtilities.py', 'FlexCompleter.py', |
878 'PyProfile.py'] or \ |
881 'PyProfile.py'] or \ |
879 os.path.dirname(fn).endswith("coverage"): |
882 os.path.dirname(fn).endswith("coverage"): |
880 return True |
883 return True |
881 |
884 |
882 if self._dbgClient.shouldSkip(fn): |
885 if self._dbgClient.shouldSkip(fn): |