ipython/ipython — pull request #2388 by DamianHeard (2012-09-06 23:14:02+00:00)
Title: Infinite loop when multiple debuggers have been attached.

[master 4ea7d56] Fixed infinite loop on exit in the event of where multiple debuggers have been attached an there is an uncaught exception. I am in the process of submitting a similar patch for ipdb but there code will be dependant on yours.

The following is the sort of example where things go wrong:

import ipdb; ipdb.set_trace()
import ipdb; ipdb.set_trace()
raise Foo
print "foo"
print "bar"

Note that this example use ipdb but you can get the gist of it.