A simple hack that can turn out to be useful someday. (For use with python twisted)

It strives to make twisted debugging easy.

For now it can:

  1. track deferred creation
  2. track when call/errback is attached to the deferred
  3. track when call/errback has executed or failed to execute
  4. track when a deferred is chained to another deferred



The following is just a summary. The real thing is hosted at (or if you are a real man, build it yourself in doc/)

Let's look at - We first create a json monitor which means that when we receive an event like deferredTracked json output with the event is appended to buffer which we could write to a file.

After that call track on objects of interest:

f = open("mon.out", "w")

for line in monitor.buffer:


Write everything to a file after reactor shuts down.

  1. Run python (Kill it with Ctrl+C or something) This will create the file mon.out.
  2. After which run cat mon.out | python reactortrack/ - This will produce a squaremap representation of the deferred.
  3. Finally traverse line-by-line the events with Debug->Next line or CTRL+N