From 30d55fdb275373516dd2133ae6f850a6acd6d7a3 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 13 Sep 2023 12:13:56 -0400 Subject: [PATCH] Add `--pdb` support to `piker search` --- piker/brokers/cli.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/piker/brokers/cli.py b/piker/brokers/cli.py index 937e936e1..814950c7d 100644 --- a/piker/brokers/cli.py +++ b/piker/brokers/cli.py @@ -454,8 +454,18 @@ async def main(): @cli.command() @click.argument('pattern', required=True) +# TODO: move this to top level click/typer context for all subs +@click.option( + '--pdb', + is_flag=True, + help='Enable tractor debug mode', +) @click.pass_obj -def search(config, pattern): +def search( + config: dict, + pattern: str, + pdb: bool, +): ''' Search for symbols from broker backend(s). @@ -468,6 +478,7 @@ async def main(func): async with maybe_open_pikerd( loglevel=config['loglevel'], + debug_mode=pdb, ): return await func()