# HG changeset patch # User Goffi # Date 1399313774 -7200 # Node ID e40d9858cb8345f93818eebde585655b334e6fee # Parent 11409a6c16c7ef0dbd7e4a50d5c40eeca136da27 core: if in debug mode and ipdb is present, use ipdb instead of pdb diff -r 11409a6c16c7 -r e40d9858cb83 src/sat.tac --- a/src/sat.tac Mon May 05 20:16:13 2014 +0200 +++ b/src/sat.tac Mon May 05 20:16:14 2014 +0200 @@ -17,6 +17,17 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +from twisted.internet import defer +if defer.Deferred.debug: + # if we are in debug mode, we want to use ipdb instead of pdb + try: + import ipdb + import pdb + pdb.set_trace = ipdb.set_trace + pdb.post_mortem = ipdb.post_mortem + except ImportError: + pass + from twisted.application import service from twisted.internet import glib2reactor glib2reactor.install()