Fixed an issue in the debugger not showing class variables. 5_1_x

Thu, 08 Sep 2011 19:38:39 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 08 Sep 2011 19:38:39 +0200
branch
5_1_x
changeset 1306
2136f10a9110
parent 1301
a2b0aceba6a2
child 1317
aa16b0456e8f

Fixed an issue in the debugger not showing class variables.
(transplanted from 14d63fe71d53ba294e731f2e83262286f343c453)

DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugClientBase.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugClientBase.py	Wed Sep 07 18:08:56 2011 +0200
+++ b/DebugClients/Python/DebugClientBase.py	Thu Sep 08 19:38:39 2011 +0200
@@ -1320,6 +1320,8 @@
                         try:
                             exec 'mdict = dict%s.__dict__' % access
                             ndict.update(mdict)
+                            exec 'mcdict = dict%s.__class__.__dict__' % access
+                            ndict.update(mcdict)
                             exec 'obj = dict%s' % access
                             if mdict and not "sipThis" in mdict.keys():
                                 del rvar[0:2]
@@ -1342,6 +1344,7 @@
                     else:
                         try:
                             ndict.update(dict[var[i]].__dict__)
+                            ndict.update(dict[var[i]].__class__.__dict__)
                             del rvar[0]
                             obj = dict[var[i]]
                         except:
--- a/DebugClients/Python3/DebugClientBase.py	Wed Sep 07 18:08:56 2011 +0200
+++ b/DebugClients/Python3/DebugClientBase.py	Thu Sep 08 19:38:39 2011 +0200
@@ -1325,6 +1325,10 @@
                             mdict = loc["mdict"]
                             obj = loc["obj"]
                             ndict.update(mdict)
+                            loc = {"dict": dict}
+                            exec('mcdict = dict{0!s}.__class__.__dict__'\
+                                 .format(access), globals(), loc)
+                            ndict.update(loc["mcdict"])
                             if mdict and not "sipThis" in mdict.keys():
                                 del rvar[0:2]
                                 access = ""
@@ -1350,6 +1354,7 @@
                     else:
                         try:
                             ndict.update(dict[var[i]].__dict__)
+                            ndict.update(dict[var[i]].__class__.__dict__)
                             del rvar[0]
                             obj = dict[var[i]]
                         except:

eric ide

mercurial