summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/g-ir-scanner.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/g-ir-scanner.in b/tools/g-ir-scanner.in
index d2ef89c6..5b8035b7 100755
--- a/tools/g-ir-scanner.in
+++ b/tools/g-ir-scanner.in
@@ -22,6 +22,12 @@
import os
import sys
+if 'GI_SCANNER_DEBUG' in os.environ:
+ def on_exception(type, value, tb):
+ import pdb
+ pdb.pm()
+ sys.excepthook = on_exception
+
# This only works on unix systems
currentdir = os.path.dirname(os.path.abspath(sys.argv[0]))
current_name = os.path.basename(currentdir)