Send every kind of output to the debugger client

Now correctly sending jerry_port_log output to the debugger client as well.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
Daniel Balla
2017-09-06 12:14:24 +02:00
committed by yichoi
parent c21c21f9f9
commit c8b99d05e1
6 changed files with 41 additions and 17 deletions
+9 -3
View File
@@ -68,8 +68,10 @@ var JERRY_DEBUGGER_EVAL_ERROR = 2;
// Subtypes of output result
var JERRY_DEBUGGER_OUTPUT_OK = 1;
var JERRY_DEBUGGER_OUTPUT_WARNING = 2;
var JERRY_DEBUGGER_OUTPUT_ERROR = 3;
var JERRY_DEBUGGER_OUTPUT_ERROR = 2;
var JERRY_DEBUGGER_OUTPUT_WARNING = 3;
var JERRY_DEBUGGER_OUTPUT_DEBUG = 4;
var JERRY_DEBUGGER_OUTPUT_TRACE = 5;
// Messages sent by the client to server.
var JERRY_DEBUGGER_FREE_BYTE_CODE_CP = 1;
@@ -944,6 +946,7 @@ function DebuggerClient(address)
switch (subType)
{
case JERRY_DEBUGGER_OUTPUT_OK:
case JERRY_DEBUGGER_OUTPUT_DEBUG:
outString = "out: " + cesu8ToString(outputResult);
break;
case JERRY_DEBUGGER_OUTPUT_WARNING:
@@ -952,12 +955,15 @@ function DebuggerClient(address)
case JERRY_DEBUGGER_OUTPUT_ERROR:
outString = "err: " + cesu8ToString(outputResult);
break;
case JERRY_DEBUGGER_OUTPUT_TRACE:
outString = "trace: " + cesu8ToString(outputResult);
break;
}
appendLog(outString);
outputResult = null;
}
return;
}
+8 -3
View File
@@ -58,8 +58,10 @@ JERRY_DEBUGGER_EVAL_ERROR = 2
# Subtypes of output
JERRY_DEBUGGER_OUTPUT_OK = 1
JERRY_DEBUGGER_OUTPUT_WARNING = 2
JERRY_DEBUGGER_OUTPUT_ERROR = 3
JERRY_DEBUGGER_OUTPUT_ERROR = 2
JERRY_DEBUGGER_OUTPUT_WARNING = 3
JERRY_DEBUGGER_OUTPUT_DEBUG = 4
JERRY_DEBUGGER_OUTPUT_TRACE = 5
# Messages sent by the client to server.
@@ -1115,12 +1117,15 @@ def main():
# Subtypes of output
if buffer_type == JERRY_DEBUGGER_OUTPUT_RESULT_END:
if subtype == JERRY_DEBUGGER_OUTPUT_OK:
if subtype in [JERRY_DEBUGGER_OUTPUT_OK,
JERRY_DEBUGGER_OUTPUT_DEBUG]:
print("%sout: %s%s" % (debugger.blue, debugger.nocolor, message))
elif subtype == JERRY_DEBUGGER_OUTPUT_WARNING:
print("%swarning: %s%s" % (debugger.yellow, debugger.nocolor, message))
elif subtype == JERRY_DEBUGGER_OUTPUT_ERROR:
print("%serr: %s%s" % (debugger.red, debugger.nocolor, message))
elif subtype == JERRY_DEBUGGER_OUTPUT_TRACE:
print("%strace: %s%s" % (debugger.blue, debugger.nocolor, message))
# Subtypes of eval
elif buffer_type == JERRY_DEBUGGER_EVAL_RESULT_END: