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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user