##// END OF EJS Templates
Added ability to invoke pdb on IPython crashes....
Fernando Perez -
Show More
@@ -41,7 +41,7 b' class CrashHandler(object):'
41 41
42 42 def __init__(self,app, app_name, contact_name=None, contact_email=None,
43 43 bug_tracker=None, crash_report_fname='CrashReport.txt',
44 show_crash_traceback=True):
44 show_crash_traceback=True, call_pdb=False):
45 45 """New crash handler.
46 46
47 47 Inputs:
@@ -83,6 +83,8 b' class CrashHandler(object):'
83 83 self.crash_report_fname = crash_report_fname
84 84 self.show_crash_traceback = show_crash_traceback
85 85 self.section_sep = '\n\n'+'*'*75+'\n\n'
86 self.call_pdb = call_pdb
87 #self.call_pdb = True # dbg
86 88
87 89 # Hardcoded defaults, which can be overridden either by subclasses or
88 90 # at runtime for the instance.
@@ -133,8 +135,14 b' $self.bug_tracker'
133 135 # properly expanded out in the user message template
134 136 self.crash_report_fname = report_name
135 137 TBhandler = ultratb.VerboseTB(color_scheme=color_scheme,
136 long_header=1)
137 traceback = TBhandler.text(etype,evalue,etb,context=31)
138 long_header=1,
139 call_pdb=self.call_pdb,
140 )
141 if self.call_pdb:
142 TBhandler(etype,evalue,etb)
143 return
144 else:
145 traceback = TBhandler.text(etype,evalue,etb,context=31)
138 146
139 147 # print traceback to screen
140 148 if self.show_crash_traceback:
General Comments 0
You need to be logged in to leave comments. Login now