Show More
@@ -287,6 +287,11 b' class Pdb(OldPdb):' | |||||
287 | self.color_scheme_table.set_active_scheme(scheme) |
|
287 | self.color_scheme_table.set_active_scheme(scheme) | |
288 | self.parser.style = scheme |
|
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 | def hidden_frames(self, stack): |
|
296 | def hidden_frames(self, stack): | |
292 | """ |
|
297 | """ | |
@@ -299,9 +304,11 b' class Pdb(OldPdb):' | |||||
299 | # avoid calling it here to preserve self.curframe_locals. |
|
304 | # avoid calling it here to preserve self.curframe_locals. | |
300 | # Futhermore, there is no good reason to hide the current frame. |
|
305 | # Futhermore, there is no good reason to hide the current frame. | |
301 | ip_hide = [ |
|
306 | ip_hide = [ | |
302 | False if s[0] is self.curframe else s[0].f_locals.get( |
|
307 | False | |
303 | "__tracebackhide__", False) |
|
308 | if s[0] in (self.curframe, getattr(self, "initial_frame", None)) | |
304 | for s in stack] |
|
309 | else s[0].f_locals.get("__tracebackhide__", False) | |
|
310 | for s in stack | |||
|
311 | ] | |||
305 | ip_start = [i for i, s in enumerate(ip_hide) if s == "__ipython_bottom__"] |
|
312 | ip_start = [i for i, s in enumerate(ip_hide) if s == "__ipython_bottom__"] | |
306 | if ip_start: |
|
313 | if ip_start: | |
307 | ip_hide = [h if i > ip_start[0] else True for (i, h) in enumerate(ip_hide)] |
|
314 | ip_hide = [h if i > ip_start[0] else True for (i, h) in enumerate(ip_hide)] |
@@ -740,8 +740,9 b' class InteractiveShell(SingletonConfigurable):' | |||||
740 | if profile_dir is not None: |
|
740 | if profile_dir is not None: | |
741 | self.profile_dir = profile_dir |
|
741 | self.profile_dir = profile_dir | |
742 | return |
|
742 | return | |
743 | self.profile_dir =\ |
|
743 | self.profile_dir = ProfileDir.create_profile_dir_by_name( | |
744 |
|
|
744 | self.ipython_dir, "default" | |
|
745 | ) | |||
745 |
|
746 | |||
746 | def init_instance_attrs(self): |
|
747 | def init_instance_attrs(self): | |
747 | self.more = False |
|
748 | self.more = False |
General Comments 0
You need to be logged in to leave comments.
Login now