summaryrefslogtreecommitdiff
path: root/bin/chroma-sim
diff options
context:
space:
mode:
Diffstat (limited to 'bin/chroma-sim')
-rwxr-xr-xbin/chroma-sim6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/chroma-sim b/bin/chroma-sim
index 9b4a536..8b0e44b 100755
--- a/bin/chroma-sim
+++ b/bin/chroma-sim
@@ -39,12 +39,18 @@ if __name__ == '__main__':
parser.add_option('--save-photons-end', action='store_true',
dest='save_photons_end',
help='save final photons to disk', default=False)
+ parser.add_option('--debug', dest='debug',
+ action='store_true', default=False,
+ help='Start python debugger on exception')
options, args = parser.parse_args()
if len(args) < 1:
sys.exit(parser.format_help())
+ if options.debug:
+ enable_debug_on_crash()
+
module_name, function_name = args[0].rsplit('.', 1)
try: