From 675921a7d71517317996188f04148a6ced8d7e7a Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 5 May 2014 20:16:14 +0200 Subject: [PATCH] core: if in debug mode and ipdb is present, use ipdb instead of pdb --- src/sat.tac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sat.tac b/src/sat.tac index 80f7a662..cbea7749 100644 --- a/src/sat.tac +++ b/src/sat.tac @@ -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()