diff --git a/releasenotes/notes/debug-mode-0dccdc3702c0590e.yaml b/releasenotes/notes/debug-mode-0dccdc3702c0590e.yaml new file mode 100644 index 00000000..07003772 --- /dev/null +++ b/releasenotes/notes/debug-mode-0dccdc3702c0590e.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds an option --debug to enable debug mode when running sushy-emulator. + diff --git a/sushy_tools/emulator/main.py b/sushy_tools/emulator/main.py index 20f1f64c..ce5bba3b 100755 --- a/sushy_tools/emulator/main.py +++ b/sushy_tools/emulator/main.py @@ -779,6 +779,8 @@ def parse_args(): type=str, help='Config file path. Can also be set via ' 'environment variable SUSHY_EMULATOR_CONFIG.') + parser.add_argument('--debug', action='store_true', + help='Enables debug mode when running sushy-emulator.') parser.add_argument('-i', '--interface', type=str, help='IP address of the local interface to listen ' @@ -819,6 +821,8 @@ def main(): args = parse_args() + app.debug = args.debug + if args.config: app.config.from_pyfile(args.config)