Load a trace for post mortem debugging
Is it possible to load a trace with PyDev? Something similar to pdb's post_mortem(traceback) function? If not, would it be hard to add?
It should work already if you have an exception (PyDev already does post-mortem handling of unhandled exceptions by replacing the except hook).
Albeit to work programatically, you need to access some protected APIs (you could take a look at those and do what they do internally directly -- shouldn't be hard):
import pydevd pydevd._set_pm_excepthook() pydevd._excepthook(exctype, value, tb)
Thanks for the help. I gave this a try but was unable to get the callstack to display correctly. I was able to get the calls to work by importing them directly from from pydevd_breakpoints (the wildcard import in pydevd didn't import the private functions), but nothing new got displayed in eclipse. Does anything special need to be done when loading through eclipse? Also, is it possible to load only the traceback without exctype and value, so the interface can be the same as PDB?
Hi, is there an update on this? Those internal APIs do not seem to exist anymore. I also tried what's propsed in #53 but it seems it needs some internal thread objects.