diff options
author | Colin Walters <walters@verbum.org> | 2010-08-25 10:57:17 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-08-31 16:05:55 -0400 |
commit | 044978052d423042e44f02a367fda7845261e366 (patch) | |
tree | b07a89e3014bfde3145df883c40d97fcc9c52d70 /tools | |
parent | 13e3bcdbc483538fc61463eb3102d06b3d6a8d33 (diff) | |
download | gobject-introspection-044978052d423042e44f02a367fda7845261e366.tar.gz |
scanner: If GI_SCANNER_DEBUG is set, drop into a debugger on error
Useful when debugging build problems for both me, and potentially over
IRC.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/g-ir-scanner.in | 6 |
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) |