diff options
Diffstat (limited to 'bin/chroma-cam')
-rwxr-xr-x | bin/chroma-cam | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/chroma-cam b/bin/chroma-cam index 6e52387..e81469e 100755 --- a/bin/chroma-cam +++ b/bin/chroma-cam @@ -8,8 +8,11 @@ if __name__ == '__main__': from chroma import view, build, EventViewer from chroma import mesh_from_stl + from chroma.tools import enable_debug_on_crash parser = optparse.OptionParser('%prog') + parser.add_option('--debug', dest='debug', action='store_true', + default=False, help='Start python debugger on exception') parser.add_option('-r', '--resolution', dest='resolution', help='specify window resolution', default='1024,576') parser.add_option('-i', dest='io_file', default=None) @@ -18,6 +21,9 @@ if __name__ == '__main__': if len(args) < 1: sys.exit(parser.format_help()) + if options.debug: + enable_debug_on_crash() + size = [int(s) for s in options.resolution.split(',')] if os.path.exists(args[0]) and args[0].lower().endswith(('.stl', '.bz2')): |