Thu, 25 Jun 2015 18:58:34 +0200
Fixed an issue in the debugger backend causing a crash if a class reimplements __repr__ and a breakpoint is set in the __init__() method of such class.
(grafted from 125a75cfd2499e348c4a44365eba87d0094f7256)
DebugClients/Python/DebugBase.py | file | annotate | diff | comparison | revisions | |
DebugClients/Python3/DebugBase.py | file | annotate | diff | comparison | revisions |
--- a/DebugClients/Python/DebugBase.py Sun Jun 21 21:07:47 2015 +0200 +++ b/DebugClients/Python/DebugBase.py Thu Jun 25 18:58:34 2015 +0200 @@ -551,8 +551,11 @@ if ffunc and not ffunc.startswith("<"): argInfo = inspect.getargvalues(fr) - fargs = inspect.formatargvalues(argInfo[0], argInfo[1], - argInfo[2], argInfo[3]) + try: + fargs = inspect.formatargvalues(argInfo[0], argInfo[1], + argInfo[2], argInfo[3]) + except Exception: + fargs = "" else: fargs = "" @@ -609,8 +612,11 @@ if ffunc and not ffunc.startswith("<"): argInfo = inspect.getargvalues(fr) - fargs = inspect.formatargvalues(argInfo[0], argInfo[1], - argInfo[2], argInfo[3]) + try: + fargs = inspect.formatargvalues(argInfo[0], argInfo[1], + argInfo[2], argInfo[3]) + except Exception: + fargs = "" else: fargs = "" @@ -709,8 +715,11 @@ if ffunc and not ffunc.startswith("<"): argInfo = inspect.getargvalues(fr) - fargs = inspect.formatargvalues(argInfo[0], argInfo[1], - argInfo[2], argInfo[3]) + try: + fargs = inspect.formatargvalues(argInfo[0], argInfo[1], + argInfo[2], argInfo[3]) + except Exception: + fargs = "" else: fargs = ""
--- a/DebugClients/Python3/DebugBase.py Sun Jun 21 21:07:47 2015 +0200 +++ b/DebugClients/Python3/DebugBase.py Thu Jun 25 18:58:34 2015 +0200 @@ -560,9 +560,12 @@ if ffunc and not ffunc.startswith("<"): argInfo = inspect.getargvalues(fr) - fargs = inspect.formatargvalues( - argInfo.args, argInfo.varargs, - argInfo.keywords, argInfo.locals) + try: + fargs = inspect.formatargvalues( + argInfo.args, argInfo.varargs, + argInfo.keywords, argInfo.locals) + except Exception: + fargs = "" else: fargs = "" @@ -619,9 +622,12 @@ if ffunc and not ffunc.startswith("<"): argInfo = inspect.getargvalues(fr) - fargs = inspect.formatargvalues( - argInfo.args, argInfo.varargs, - argInfo.keywords, argInfo.locals) + try: + fargs = inspect.formatargvalues( + argInfo.args, argInfo.varargs, + argInfo.keywords, argInfo.locals) + except Exception: + fargs = "" else: fargs = "" @@ -723,9 +729,12 @@ if ffunc and not ffunc.startswith("<"): argInfo = inspect.getargvalues(fr) - fargs = inspect.formatargvalues( - argInfo.args, argInfo.varargs, - argInfo.keywords, argInfo.locals) + try: + fargs = inspect.formatargvalues( + argInfo.args, argInfo.varargs, + argInfo.keywords, argInfo.locals) + except Exception: + fargs = "" else: fargs = ""