<br><div class="gmail_quote">On Mon, Jul 16, 2012 at 11:45 PM, Dan Stromberg <span dir="ltr"><<a href="mailto:drsalists@gmail.com" target="_blank">drsalists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div class="gmail_quote"><div class="im">On Mon, Jul 16, 2012 at 11:20 PM, Andrew Bennetts <span dir="ltr"><<a href="mailto:andrew@bemusement.org" target="_blank">andrew@bemusement.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dan Stromberg wrote:<br>
[…]<br>
<div>> I'm playing with twisted.internet.defer.setDebugging now.<br>
><br>
> Is there a corresponding function that can be used to produce its report?<br>
> If I use it in a program with an infinite loop, it seems like I never get<br>
> the report, but if I use it in a program with a finite length, I eventually<br>
> get a useful-looking report.<br>
<br>
</div>It's triggered by garbage collection of a Deferred with an unhandled error. So<br>
you're at the mercy of when the garbage collector of your Python VM decides to<br>
collect that object.<br>
<br>
You could call yourDeferred._debugInfo._getDebugTracebacks() yourself, though,<br>
if you don't mind (ab)using private attributes that might break without warning.</blockquote></div><div><br>Strangely, this doesn't give the report until after the sleep finishes... ?<br><br></div></div></blockquote>
<div>It turned out that I needed to print d._debugInfo._getDebugTracebacks(), rather than just running d._debugInfo._getDebugTracebacks().<br><br>However, it always appears to print the debug tracebacks for the deferred named - in this case, d. It doesn't appear to be selecting the correct deferred(s) to print.<br>
<br><br></div></div>