List scope chain levels and their variables to the selected stack frame. (#2557)

It supports to list the scope chain of the current execution context and see
which variables are available.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2018-10-29 14:33:31 +01:00
committed by Akos Kiss
parent 7120b8ec02
commit 34c5e229ee
14 changed files with 914 additions and 13 deletions
+10
View File
@@ -118,6 +118,11 @@ class DebuggerPrompt(Cmd):
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:
@@ -172,6 +177,11 @@ class DebuggerPrompt(Cmd):
self.stop = True
do_ms = do_memstats
def do_scopes(self, _):
""" Memory statistics """
self.debugger.scope_chain()
self.stop = True
def do_abort(self, args):
""" Throw an exception """
self.debugger.abort(args)