@@ -78,7 +78,7 @@ def filter_var_dict(d):
7878
7979class PGLogger (bdb .Bdb ):
8080
81- def __init__ (self , finalizer_func , cumulative_display = False ):
81+ def __init__ (self , cumulative_mode , finalizer_func ):
8282 bdb .Bdb .__init__ (self )
8383 self .mainpyfile = ''
8484 self ._wait_for_mainpyfile = 0
@@ -90,7 +90,7 @@ def __init__(self, finalizer_func, cumulative_display=False):
9090 # if True, then displays ALL stack frames that have ever existed
9191 # rather than only those currently on the stack (and their
9292 # lexical parents)
93- self .cumulative_display = cumulative_display
93+ self .cumulative_mode = cumulative_mode
9494
9595 # each entry contains a dict with the information for a single
9696 # executed line
@@ -109,7 +109,7 @@ def __init__(self, finalizer_func, cumulative_display=False):
109109 self .cur_frame_id = 1
110110
111111 # List of frames to KEEP AROUND after the function exits.
112- # If cumulative_display is True, then keep ALL frames in
112+ # If cumulative_mode is True, then keep ALL frames in
113113 # zombie_frames; otherwise keep only frames where
114114 # nested functions were defined within them.
115115 self .zombie_frames = []
@@ -244,7 +244,7 @@ def interaction(self, frame, traceback, event_type):
244244 self .frame_ordered_ids [top_frame ] = self .cur_frame_id
245245 self .cur_frame_id += 1
246246
247- if self .cumulative_display :
247+ if self .cumulative_mode :
248248 self .zombie_frames .append (top_frame )
249249
250250
@@ -465,6 +465,10 @@ def create_encoded_stack_entry(cur_frame):
465465 # frame_id is UNIQUE, so it can disambiguate recursive calls
466466 hash_str += '_f' + str (e ['frame_id' ])
467467
468+ # needed to refresh GUI display ...
469+ if e ['is_parent' ]:
470+ hash_str += '_p'
471+
468472 # TODO: this is no longer needed, right? (since frame_id is unique)
469473 #if e['parent_frame_id_list']:
470474 # hash_str += '_p' + '_'.join([str(i) for i in e['parent_frame_id_list']])
@@ -596,8 +600,8 @@ def finalize(self):
596600
597601
598602# the MAIN meaty function!!!
599- def exec_script_str (script_str , finalizer_func ):
600- logger = PGLogger (finalizer_func )
603+ def exec_script_str (script_str , cumulative_mode , finalizer_func ):
604+ logger = PGLogger (cumulative_mode , finalizer_func )
601605
602606 try :
603607 logger ._runscript (script_str )
0 commit comments