[gobject-introspection/wip/transformer: 1/17] scanner: If GI_SCANNER_DEBUG is set, drop into a debugger on error
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/transformer: 1/17] scanner: If GI_SCANNER_DEBUG is set, drop into a debugger on error
- Date: Fri, 27 Aug 2010 20:38:55 +0000 (UTC)
commit 791f1b48054546e1d87441c84f26ab77dc4636a2
Author: Colin Walters <walters verbum org>
Date: Wed Aug 25 10:57:17 2010 -0400
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.
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 d2ef89c..5b8035b 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]