Add finish debugger command. (#2240)
With this command the engine continue running just after the function in the current stack frame returns. JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
This commit is contained in:
@@ -28,7 +28,7 @@ import math
|
||||
import time
|
||||
|
||||
# Expected debugger protocol version.
|
||||
JERRY_DEBUGGER_VERSION = 1
|
||||
JERRY_DEBUGGER_VERSION = 2
|
||||
|
||||
# Messages sent by the server to client.
|
||||
JERRY_DEBUGGER_CONFIGURATION = 1
|
||||
@@ -85,9 +85,10 @@ JERRY_DEBUGGER_CONTEXT_RESET = 11
|
||||
JERRY_DEBUGGER_CONTINUE = 12
|
||||
JERRY_DEBUGGER_STEP = 13
|
||||
JERRY_DEBUGGER_NEXT = 14
|
||||
JERRY_DEBUGGER_GET_BACKTRACE = 15
|
||||
JERRY_DEBUGGER_EVAL = 16
|
||||
JERRY_DEBUGGER_EVAL_PART = 17
|
||||
JERRY_DEBUGGER_FINISH = 15
|
||||
JERRY_DEBUGGER_GET_BACKTRACE = 16
|
||||
JERRY_DEBUGGER_EVAL = 17
|
||||
JERRY_DEBUGGER_EVAL_PART = 18
|
||||
|
||||
MAX_BUFFER_SIZE = 128
|
||||
WEBSOCKET_BINARY_FRAME = 2
|
||||
@@ -286,6 +287,13 @@ class DebuggerPrompt(Cmd):
|
||||
|
||||
do_n = do_next
|
||||
|
||||
def do_finish(self, args):
|
||||
""" Continue running until the current function returns """
|
||||
self._exec_command(args, JERRY_DEBUGGER_FINISH)
|
||||
self.cont = True
|
||||
|
||||
do_f = do_finish
|
||||
|
||||
def do_list(self, _):
|
||||
""" Lists the available breakpoints """
|
||||
if self.debugger.active_breakpoint_list:
|
||||
|
||||
Reference in New Issue
Block a user