Python debugger cleanup (#3635)

- Rename scopes to scope
- Make functions private
- Reorder some functions

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-04-02 17:57:23 +02:00
committed by GitHub
parent 1bd1a36a81
commit 28f2772d9c
12 changed files with 264 additions and 264 deletions
+51 -43
View File
@@ -76,8 +76,12 @@ class DebuggerPrompt(Cmd):
""" Delete the given breakpoint, use 'delete all|active|pending' to clear all the given breakpoints """
write(self.debugger.delete(args))
def do_exception(self, args):
""" Config the exception handler module """
write(self.debugger.exception(args))
def do_next(self, args):
""" Next breakpoint in the same context """
""" Next breakpoint in the same code block """
self.stop = True
if not args:
args = 0
@@ -116,17 +120,26 @@ class DebuggerPrompt(Cmd):
self.stop = True
do_s = do_step
def do_continue(self, _):
""" Continue execution """
self.debugger.do_continue()
self.stop = True
if not self.debugger.non_interactive:
print("Press enter to stop JavaScript execution.")
do_c = do_continue
def do_finish(self, _):
""" Continue running until the current function returns """
self.debugger.finish()
self.stop = True
do_f = do_finish
def do_backtrace(self, args):
""" Get backtrace data from debugger """
write(self.debugger.backtrace(args))
self.stop = True
do_bt = do_backtrace
def do_variables(self, args):
""" Get scope variables from debugger """
write(self.debugger.scope_variables(args))
self.stop = True
def do_src(self, args):
""" Get current source code """
if args:
@@ -150,27 +163,6 @@ class DebuggerPrompt(Cmd):
else:
print("Invalid key")
def do_continue(self, _):
""" Continue execution """
self.debugger.do_continue()
self.stop = True
if not self.debugger.non_interactive:
print("Press enter to stop JavaScript execution.")
do_c = do_continue
def do_finish(self, _):
""" Continue running until the current function returns """
self.debugger.finish()
self.stop = True
do_f = do_finish
def do_dump(self, args):
""" Dump all of the debugger data """
if args:
print("Error: No argument expected")
else:
pprint(self.debugger.function_list)
def do_eval(self, args):
""" Evaluate JavaScript source code """
self.debugger.eval(args)
@@ -200,19 +192,13 @@ class DebuggerPrompt(Cmd):
self.debugger.eval_at(code, index)
self.stop = True
def do_memstats(self, _):
""" Memory statistics """
self.debugger.memstats()
self.stop = True
do_ms = do_memstats
def do_scopes(self, _):
""" Memory statistics """
self.debugger.scope_chain()
def do_throw(self, args):
""" Throw an exception """
self.debugger.throw(args)
self.stop = True
def do_abort(self, args):
""" Throw an exception """
""" Throw an exception which cannot be caught """
self.debugger.abort(args)
self.stop = True
@@ -222,14 +208,36 @@ class DebuggerPrompt(Cmd):
self.stop = True
do_res = do_restart
def do_throw(self, args):
""" Throw an exception """
self.debugger.throw(args)
def do_scope(self, _):
""" Get lexical environment chain """
self.debugger.scope_chain()
self.stop = True
def do_exception(self, args):
""" Config the exception handler module """
write(self.debugger.exception(args))
def do_variables(self, args):
""" Get scope variables from debugger """
write(self.debugger.scope_variables(args))
self.stop = True
def do_memstats(self, _):
""" Memory statistics """
self.debugger.memstats()
self.stop = True
do_ms = do_memstats
def do_dump(self, args):
""" Dump all of the debugger data """
if args:
print("Error: No argument expected")
else:
pprint(self.debugger.function_list)
# pylint: disable=invalid-name
def do_EOF(self, _):
""" Exit JerryScript debugger """
print("Unexpected end of input. Connection closed.")
self.debugger.quit()
self.quit = True
self.stop = True
def _scroll_direction(debugger, direction):
""" Helper function for do_scroll """
+112 -120
View File
@@ -276,7 +276,7 @@ class JerryDebugger(object):
self.exception_string = ''
self.frame_index = 0
self.scope_vars = ""
self.scopes = ""
self.scope_data = ""
self.client_sources = []
self.last_breakpoint_hit = None
self.next_breakpoint_index = 0
@@ -349,33 +349,18 @@ class JerryDebugger(object):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_CONTINUE)
def set_colors(self):
self.nocolor = '\033[0m'
self.green = '\033[92m'
self.red = '\033[31m'
self.yellow = '\033[93m'
self.green_bg = '\033[42m\033[30m'
self.yellow_bg = '\033[43m\033[30m'
self.blue = '\033[94m'
def stop(self):
self._exec_command(JERRY_DEBUGGER_STOP)
def do_continue(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_CONTINUE)
def finish(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_FINISH)
def next(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_NEXT)
def step(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_STEP)
def memstats(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_MEMSTATS)
def scope_chain(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_GET_SCOPE_CHAIN)
def set_break(self, args):
if not args:
return "Error: Breakpoint index expected"
@@ -392,40 +377,6 @@ class JerryDebugger(object):
return self._set_breakpoint(args, False)
def delete(self, args):
if not args:
return "Error: Breakpoint index expected\n" \
"Delete the given breakpoint, use 'delete all|active|pending' " \
"to clear all the given breakpoints\n "
elif args in ['all', 'pending', 'active']:
if args == "all":
self.delete_active()
self.delete_pending()
elif args == "pending":
self.delete_pending()
elif args == "active":
self.delete_active()
return ""
try:
breakpoint_index = int(args)
except ValueError as val_errno:
return "Error: Integer number expected, %s\n" % (val_errno)
if breakpoint_index in self.active_breakpoint_list:
breakpoint = self.active_breakpoint_list[breakpoint_index]
del self.active_breakpoint_list[breakpoint_index]
breakpoint.active_index = -1
self.send_breakpoint(breakpoint)
return "Breakpoint %d deleted\n" % (breakpoint_index)
elif breakpoint_index in self.pending_breakpoint_list:
del self.pending_breakpoint_list[breakpoint_index]
if not self.pending_breakpoint_list:
self.send_parser_config(0)
return "Pending breakpoint %d deleted\n" % (breakpoint_index)
else:
return "Error: Breakpoint %d not found\n" % (breakpoint_index)
def breakpoint_list(self):
result = ''
if self.active_breakpoint_list:
@@ -442,6 +393,60 @@ class JerryDebugger(object):
return result
def delete(self, args):
if not args:
return "Error: Breakpoint index expected\n" \
"Delete the given breakpoint, use 'delete all|active|pending' " \
"to clear all the given breakpoints\n "
elif args in ['all', 'pending', 'active']:
if args != "pending":
for i in self.active_breakpoint_list.values():
breakpoint = self.active_breakpoint_list[i.active_index]
del self.active_breakpoint_list[i.active_index]
breakpoint.active_index = -1
self._send_breakpoint(breakpoint)
if args != "active":
if self.pending_breakpoint_list:
self.pending_breakpoint_list.clear()
self._send_parser_config(0)
return ""
try:
breakpoint_index = int(args)
except ValueError as val_errno:
return "Error: Integer number expected, %s\n" % (val_errno)
if breakpoint_index in self.active_breakpoint_list:
breakpoint = self.active_breakpoint_list[breakpoint_index]
del self.active_breakpoint_list[breakpoint_index]
breakpoint.active_index = -1
self._send_breakpoint(breakpoint)
return "Breakpoint %d deleted\n" % (breakpoint_index)
elif breakpoint_index in self.pending_breakpoint_list:
del self.pending_breakpoint_list[breakpoint_index]
if not self.pending_breakpoint_list:
self._send_parser_config(0)
return "Pending breakpoint %d deleted\n" % (breakpoint_index)
else:
return "Error: Breakpoint %d not found\n" % (breakpoint_index)
def next(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_NEXT)
def step(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_STEP)
def do_continue(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_CONTINUE)
def finish(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_FINISH)
def backtrace(self, args):
max_depth = 0
min_depth = 0
@@ -483,28 +488,6 @@ class JerryDebugger(object):
self.prompt = False
return ""
def scope_variables(self, args):
index = 0
if args:
try:
index = int(args)
if index < 0:
print ("Error: A non negative integer number expected")
return ""
except ValueError as val_errno:
return "Error: Non negative integer number expected, %s\n" % (val_errno)
message = struct.pack(self.byte_order + "BB" + self.idx_format,
1 + 4,
JERRY_DEBUGGER_GET_SCOPE_VARIABLES,
index)
self.channel.send_message(self.byte_order, message)
self.prompt = False
return ""
def eval(self, code):
self._send_string(JERRY_DEBUGGER_EVAL_EVAL + code, JERRY_DEBUGGER_EVAL)
self.prompt = False
@@ -538,15 +521,45 @@ class JerryDebugger(object):
if enabled:
logging.debug("Stop at exception enabled")
self.send_exception_config(enabled)
self._send_exception_config(enabled)
return "Stop at exception enabled\n"
logging.debug("Stop at exception disabled")
self.send_exception_config(enabled)
self._send_exception_config(enabled)
return "Stop at exception disabled\n"
def scope_chain(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_GET_SCOPE_CHAIN)
def scope_variables(self, args):
index = 0
if args:
try:
index = int(args)
if index < 0:
print("Error: A non negative integer number expected")
return ""
except ValueError as val_errno:
return "Error: Non negative integer number expected, %s\n" % (val_errno)
message = struct.pack(self.byte_order + "BB" + self.idx_format,
1 + 4,
JERRY_DEBUGGER_GET_SCOPE_VARIABLES,
index)
self.channel.send_message(self.byte_order, message)
self.prompt = False
return ""
def memstats(self):
self.prompt = False
self._exec_command(JERRY_DEBUGGER_MEMSTATS)
def _send_string(self, args, message_type, index=0):
# 1: length of type byte
@@ -594,19 +607,7 @@ class JerryDebugger(object):
self.channel.send_message(self.byte_order, message + args[prev_offset:offset])
def delete_active(self):
for i in self.active_breakpoint_list.values():
breakpoint = self.active_breakpoint_list[i.active_index]
del self.active_breakpoint_list[i.active_index]
breakpoint.active_index = -1
self.send_breakpoint(breakpoint)
def delete_pending(self):
if self.pending_breakpoint_list:
self.pending_breakpoint_list.clear()
self.send_parser_config(0)
def breakpoint_pending_exists(self, breakpoint):
def _breakpoint_pending_exists(self, breakpoint):
for existing_bp in self.pending_breakpoint_list.values():
if (breakpoint.line and existing_bp.source_name == breakpoint.source_name and \
existing_bp.line == breakpoint.line) \
@@ -615,7 +616,7 @@ class JerryDebugger(object):
return False
def send_breakpoint(self, breakpoint):
def _send_breakpoint(self, breakpoint):
message = struct.pack(self.byte_order + "BBB" + self.cp_format + self.idx_format,
1 + 1 + self.cp_size + 4,
JERRY_DEBUGGER_UPDATE_BREAKPOINT,
@@ -624,36 +625,27 @@ class JerryDebugger(object):
breakpoint.offset)
self.channel.send_message(self.byte_order, message)
def send_bytecode_cp(self, byte_code_cp):
def _send_bytecode_cp(self, byte_code_cp):
message = struct.pack(self.byte_order + "BB" + self.cp_format,
1 + self.cp_size,
JERRY_DEBUGGER_FREE_BYTE_CODE_CP,
byte_code_cp)
self.channel.send_message(self.byte_order, message)
def send_exception_config(self, enable):
def _send_exception_config(self, enable):
message = struct.pack(self.byte_order + "BBB",
1 + 1,
JERRY_DEBUGGER_EXCEPTION_CONFIG,
enable)
self.channel.send_message(self.byte_order, message)
def send_parser_config(self, enable):
def _send_parser_config(self, enable):
message = struct.pack(self.byte_order + "BBB",
1 + 1,
JERRY_DEBUGGER_PARSER_CONFIG,
enable)
self.channel.send_message(self.byte_order, message)
def set_colors(self):
self.nocolor = '\033[0m'
self.green = '\033[92m'
self.red = '\033[31m'
self.yellow = '\033[93m'
self.green_bg = '\033[42m\033[30m'
self.yellow_bg = '\033[43m\033[30m'
self.blue = '\033[94m'
def store_client_sources(self, args):
self.client_sources = args
@@ -805,11 +797,11 @@ class JerryDebugger(object):
self.send_client_source()
elif buffer_type in [JERRY_DEBUGGER_SCOPE_CHAIN, JERRY_DEBUGGER_SCOPE_CHAIN_END]:
self.scopes = data[1:]
self.scope_data = data[1:]
if buffer_type == JERRY_DEBUGGER_SCOPE_CHAIN_END:
result = self._process_scopes()
self.scopes = ""
result = self._process_scope()
self.scope_data = ""
self.prompt = True
@@ -971,7 +963,7 @@ class JerryDebugger(object):
if byte_code_cp in new_function_list:
del new_function_list[byte_code_cp]
self.send_bytecode_cp(byte_code_cp)
self._send_bytecode_cp(byte_code_cp)
else:
self._release_function(data)
@@ -1021,7 +1013,7 @@ class JerryDebugger(object):
del bp_list[breakpoint_index]
if not bp_list:
self.send_parser_config(0)
self._send_parser_config(0)
return result
logging.debug("No pending breakpoints")
@@ -1040,13 +1032,13 @@ class JerryDebugger(object):
del self.active_breakpoint_list[breakpoint.active_index]
del self.function_list[byte_code_cp]
self.send_bytecode_cp(byte_code_cp)
self._send_bytecode_cp(byte_code_cp)
logging.debug("Function {0x%x} byte-code released", byte_code_cp)
def _enable_breakpoint(self, breakpoint):
if isinstance(breakpoint, JerryPendingBreakpoint):
if self.breakpoint_pending_exists(breakpoint):
if self._breakpoint_pending_exists(breakpoint):
return "%sPending breakpoint%s already exists\n" % (self.yellow, self.nocolor)
self.next_breakpoint_index += 1
@@ -1061,7 +1053,7 @@ class JerryDebugger(object):
self.next_breakpoint_index += 1
self.active_breakpoint_list[self.next_breakpoint_index] = breakpoint
breakpoint.active_index = self.next_breakpoint_index
self.send_breakpoint(breakpoint)
self._send_breakpoint(breakpoint)
return "%sBreakpoint %d%s at %s\n" % (self.green,
breakpoint.active_index,
@@ -1103,7 +1095,7 @@ class JerryDebugger(object):
ans = sys.stdin.readline()
if ans in ['yes\n', 'y\n']:
if not self.pending_breakpoint_list:
self.send_parser_config(1)
self._send_parser_config(1)
if line:
breakpoint = JerryPendingBreakpoint(int(line.group(2)), line.group(1))
@@ -1235,11 +1227,11 @@ class JerryDebugger(object):
return result
def _process_scopes(self):
def _process_scope(self):
result = ""
table = [['level', 'type']]
for i, level in enumerate(self.scopes):
for i, level in enumerate(self.scope_data):
if ord(level) == JERRY_DEBUGGER_SCOPE_WITH:
table.append([str(i), 'with'])
elif ord(level) == JERRY_DEBUGGER_SCOPE_GLOBAL:
+2 -2
View File
@@ -4,14 +4,14 @@ n
eval_at 0 b
b do_eval_at.js:20
n
scopes
scope
eval_at 0 b
eval_at 1 b
eval_at 0 b=20
eval_at 1 b=100
n
eval_at 0 a
scopes
scope
eval_at 0 b
eval_at -1 b
eval_at 65536 b
+2 -2
View File
@@ -12,7 +12,7 @@ Stopped at tests/debugger/do_eval_at.js:23
Breakpoint 1 at tests/debugger/do_eval_at.js:20 (in f() at line:17, col:1)
(jerry-debugger) n
Stopped at breakpoint:1 tests/debugger/do_eval_at.js:20 (in f() at line:17, col:1)
(jerry-debugger) scopes
(jerry-debugger) scope
level | type
0 | local
1 | global
@@ -28,7 +28,7 @@ level | type
Stopped at tests/debugger/do_eval_at.js:25
(jerry-debugger) eval_at 0 a
23
(jerry-debugger) scopes
(jerry-debugger) scope
level | type
0 | global
(jerry-debugger) eval_at 0 b
+5 -5
View File
@@ -4,10 +4,10 @@ Stopped at tests/debugger/do_help.js:15
Documented commands (type help <topic>):
========================================
abort c e finish n s step
b continue eval help next scopes throw
backtrace delete eval_at list quit scroll variables
break display exception memstats res source
bt dump f ms restart src
EOF bt dump f ms restart src
abort c e finish n s step
b continue eval help next scope throw
backtrace delete eval_at list quit scroll variables
break display exception memstats res source
(jerry-debugger) quit
+19
View File
@@ -0,0 +1,19 @@
scope
b do_scope.js:22
c
scope
c
scope
b do_scope.js:28
c
scope
b do_scope.js:31
c
scope
b do_scope.js:33
c
scope
b do_scope.js:35
c
scope
c
+63
View File
@@ -0,0 +1,63 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_scope.js:15
(jerry-debugger) scope
level | type
0 | global
(jerry-debugger) b do_scope.js:22
Breakpoint 1 at tests/debugger/do_scope.js:22 (in f() at line:17, col:1)
(jerry-debugger) c
Exception throw detected (to disable automatic stop type exception 0)
Exception hint: error
Stopped at tests/debugger/do_scope.js:19 (in f() at line:17, col:1)
(jerry-debugger) scope
level | type
0 | local
1 | global
(jerry-debugger) c
Stopped at breakpoint:1 tests/debugger/do_scope.js:22 (in f() at line:17, col:1)
(jerry-debugger) scope
level | type
0 | catch
1 | local
2 | global
(jerry-debugger) b do_scope.js:28
Breakpoint 2 at tests/debugger/do_scope.js:28 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:2 tests/debugger/do_scope.js:28 (in function() at line:27, col:4)
(jerry-debugger) scope
level | type
0 | local
1 | closure
2 | global
(jerry-debugger) b do_scope.js:31
Breakpoint 3 at tests/debugger/do_scope.js:31 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:3 tests/debugger/do_scope.js:31 (in function() at line:27, col:4)
(jerry-debugger) scope
level | type
0 | with
1 | local
2 | closure
3 | global
(jerry-debugger) b do_scope.js:33
Breakpoint 4 at tests/debugger/do_scope.js:33 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:4 tests/debugger/do_scope.js:33 (in function() at line:27, col:4)
(jerry-debugger) scope
level | type
0 | with
1 | with
2 | local
3 | closure
4 | global
(jerry-debugger) b do_scope.js:35
Breakpoint 5 at tests/debugger/do_scope.js:35 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:5 tests/debugger/do_scope.js:35 (in function() at line:27, col:4)
(jerry-debugger) scope
level | type
0 | with
1 | local
2 | closure
3 | global
(jerry-debugger) c
-19
View File
@@ -1,19 +0,0 @@
scopes
b do_scopes.js:22
c
scopes
c
scopes
b do_scopes.js:28
c
scopes
b do_scopes.js:31
c
scopes
b do_scopes.js:33
c
scopes
b do_scopes.js:35
c
scopes
c
-63
View File
@@ -1,63 +0,0 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_scopes.js:15
(jerry-debugger) scopes
level | type
0 | global
(jerry-debugger) b do_scopes.js:22
Breakpoint 1 at tests/debugger/do_scopes.js:22 (in f() at line:17, col:1)
(jerry-debugger) c
Exception throw detected (to disable automatic stop type exception 0)
Exception hint: error
Stopped at tests/debugger/do_scopes.js:19 (in f() at line:17, col:1)
(jerry-debugger) scopes
level | type
0 | local
1 | global
(jerry-debugger) c
Stopped at breakpoint:1 tests/debugger/do_scopes.js:22 (in f() at line:17, col:1)
(jerry-debugger) scopes
level | type
0 | catch
1 | local
2 | global
(jerry-debugger) b do_scopes.js:28
Breakpoint 2 at tests/debugger/do_scopes.js:28 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:2 tests/debugger/do_scopes.js:28 (in function() at line:27, col:4)
(jerry-debugger) scopes
level | type
0 | local
1 | closure
2 | global
(jerry-debugger) b do_scopes.js:31
Breakpoint 3 at tests/debugger/do_scopes.js:31 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:3 tests/debugger/do_scopes.js:31 (in function() at line:27, col:4)
(jerry-debugger) scopes
level | type
0 | with
1 | local
2 | closure
3 | global
(jerry-debugger) b do_scopes.js:33
Breakpoint 4 at tests/debugger/do_scopes.js:33 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:4 tests/debugger/do_scopes.js:33 (in function() at line:27, col:4)
(jerry-debugger) scopes
level | type
0 | with
1 | with
2 | local
3 | closure
4 | global
(jerry-debugger) b do_scopes.js:35
Breakpoint 5 at tests/debugger/do_scopes.js:35 (in function() at line:27, col:4)
(jerry-debugger) c
Stopped at breakpoint:5 tests/debugger/do_scopes.js:35 (in function() at line:27, col:4)
(jerry-debugger) scopes
level | type
0 | with
1 | local
2 | closure
3 | global
(jerry-debugger) c
+5 -5
View File
@@ -1,27 +1,27 @@
scopes
scope
variables
variables 1
variables 0
b tests/debugger/do_variables.js:20
c
scopes
scope
variables 0
variables 1
variables 2
b tests/debugger/do_variables.js:30
c
scopes
scope
variables 1
variables 0
b tests/debugger/do_variables.js:33
c
c
scopes
scope
variables 0
variables 1
b tests/debugger/do_variables.js:50
c
scopes
scope
variables 0
variables 1
variables 2
+5 -5
View File
@@ -1,6 +1,6 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_variables.js:15
(jerry-debugger) scopes
(jerry-debugger) scope
level | type
0 | global
(jerry-debugger) variables
@@ -29,7 +29,7 @@ assert | Function |
Breakpoint 1 at tests/debugger/do_variables.js:20 (in function() at line:19, col:10)
(jerry-debugger) c
Stopped at breakpoint:1 tests/debugger/do_variables.js:20 (in function() at line:19, col:10)
(jerry-debugger) scopes
(jerry-debugger) scope
level | type
0 | local
1 | closure
@@ -56,7 +56,7 @@ assert | Function |
Breakpoint 2 at tests/debugger/do_variables.js:30 (in f() at line:28, col:1)
(jerry-debugger) c
Stopped at breakpoint:2 tests/debugger/do_variables.js:30 (in f() at line:28, col:1)
(jerry-debugger) scopes
(jerry-debugger) scope
level | type
0 | local
1 | global
@@ -87,7 +87,7 @@ Exception hint: error
Stopped at breakpoint:2 tests/debugger/do_variables.js:30 (in f() at line:28, col:1)
(jerry-debugger) c
Stopped at breakpoint:3 tests/debugger/do_variables.js:33 (in f() at line:28, col:1)
(jerry-debugger) scopes
(jerry-debugger) scope
level | type
0 | catch
1 | local
@@ -106,7 +106,7 @@ c | undefined | undefined
Breakpoint 4 at tests/debugger/do_variables.js:50 (in function() at line:46, col:4)
(jerry-debugger) c
Stopped at breakpoint:4 tests/debugger/do_variables.js:50 (in function() at line:46, col:4)
(jerry-debugger) scopes
(jerry-debugger) scope
level | type
0 | with
1 | local