From 5eb00b7ae0d314fff7cc9f498228f8550ffa175f Mon Sep 17 00:00:00 2001 From: Daniel Balla Date: Fri, 2 Jun 2017 10:40:12 +0200 Subject: [PATCH] Add command line option to exception and display commands (#1872) You can now set --display and --exception parameters in the command line. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu --- jerry-debugger/jerry-client-ws.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jerry-debugger/jerry-client-ws.py b/jerry-debugger/jerry-client-ws.py index 7ee6b53e7..dde22b723 100755 --- a/jerry-debugger/jerry-client-ws.py +++ b/jerry-debugger/jerry-client-ws.py @@ -81,6 +81,10 @@ def arguments_parse(): help="disable stop when newline is pressed (default: %(default)s)") parser.add_argument("--color", action="store_true", default=False, help="enable color highlighting on source commands (default: %(default)s)") + parser.add_argument("--display", action="store", default=None, type=int, + help="set display range") + parser.add_argument("--exception", action="store", default=None, type=int, choices=[0, 1], + help="set exception config, usage 1: [Enable] or 0: [Disable]") args = parser.parse_args() @@ -894,6 +898,12 @@ def main(): prompt.prompt = "(jerry-debugger) " prompt.non_interactive = non_interactive + if args.display: + prompt.do_display(args.display) + + if args.exception: + prompt.do_exception(args.exception) + while True: if not non_interactive and prompt.cont: if sys.stdin in select.select([sys.stdin], [], [], 0)[0]: