##// END OF EJS Templates
Merge pull request #12631 from Carreau/last-frame-debugger...
Matthias Bussonnier -
r26148:93d31bb9 merge
parent child
Show More
@@ -287,6 +287,11 class Pdb(OldPdb):
287 287 self.color_scheme_table.set_active_scheme(scheme)
288 288 self.parser.style = scheme
289 289
290 def set_trace(self, frame=None):
291 if frame is None:
292 frame = sys._getframe().f_back
293 self.initial_frame = frame
294 return super().set_trace(frame)
290 295
291 296 def hidden_frames(self, stack):
292 297 """
@@ -299,9 +304,11 class Pdb(OldPdb):
299 304 # avoid calling it here to preserve self.curframe_locals.
300 305 # Futhermore, there is no good reason to hide the current frame.
301 306 ip_hide = [
302 False if s[0] is self.curframe else s[0].f_locals.get(
303 "__tracebackhide__", False)
304 for s in stack]
307 False
308 if s[0] in (self.curframe, getattr(self, "initial_frame", None))
309 else s[0].f_locals.get("__tracebackhide__", False)
310 for s in stack
311 ]
305 312 ip_start = [i for i, s in enumerate(ip_hide) if s == "__ipython_bottom__"]
306 313 if ip_start:
307 314 ip_hide = [h if i > ip_start[0] else True for (i, h) in enumerate(ip_hide)]
@@ -740,8 +740,9 class InteractiveShell(SingletonConfigurable):
740 740 if profile_dir is not None:
741 741 self.profile_dir = profile_dir
742 742 return
743 self.profile_dir =\
744 ProfileDir.create_profile_dir_by_name(self.ipython_dir, 'default')
743 self.profile_dir = ProfileDir.create_profile_dir_by_name(
744 self.ipython_dir, "default"
745 )
745 746
746 747 def init_instance_attrs(self):
747 748 self.more = False
General Comments 0
You need to be logged in to leave comments. Login now