Mercurial > piecrust2
changeset 169:f3aa511eef99
serve: Add option to use the debugger without `--debug`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 03 Jan 2015 18:06:52 -0800 |
parents | 56d6b17e057b |
children | c3831a762bc2 |
files | piecrust/commands/builtin/serving.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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()