# HG changeset patch # User Ludovic Chabant # Date 1420337212 28800 # Node ID f3aa511eef998b6636b2bab4dc8d3e8342936bc8 # Parent 56d6b17e057b954d8605911b45c8d581b4e2b016 serve: Add option to use the debugger without `--debug`. diff -r 56d6b17e057b -r f3aa511eef99 piecrust/commands/builtin/serving.py --- a/piecrust/commands/builtin/serving.py Sat Jan 03 18:06:34 2015 -0800 +++ b/piecrust/commands/builtin/serving.py Sat Jan 03 18:06:52 2015 -0800 @@ -22,13 +22,16 @@ parser.add_argument('--use-reloader', help="Restart the server when PieCrust code changes", action='store_true') + parser.add_argument('--use-debugger', + help="Show the debugger when an error occurs", + action='store_true') def run(self, ctx): server = Server( ctx.app.root_dir, host=ctx.args.address, port=ctx.args.port, - debug=ctx.args.debug, + debug=(ctx.args.debug or ctx.args.use_debugger), use_reloader=ctx.args.use_reloader) server.run()