Add JERRY_FEATURE_DEBUGGER (#1738)
Until now, it was not possible to query the engine whether its build configuration contained debugging support. This commit adds the `JERRY_FEATURE_DEBUGGER` label to `jerry_feature_t` and extends `jerry_is_feature_enabled` to support the new feature flag. Additionally, the command line tool `jerry` was enhanced to report a warning when invoked with `--start-debug-server` but linked to a non-debuggable engine. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
+10
-1
@@ -483,7 +483,16 @@ main (int argc,
|
||||
}
|
||||
else if (!strcmp ("--start-debug-server", argv[i]))
|
||||
{
|
||||
flags |= JERRY_INIT_DEBUGGER;
|
||||
if (jerry_is_feature_enabled (JERRY_FEATURE_DEBUGGER))
|
||||
{
|
||||
flags |= JERRY_INIT_DEBUGGER;
|
||||
}
|
||||
else
|
||||
{
|
||||
jerry_port_default_set_log_level (JERRY_LOG_LEVEL_WARNING);
|
||||
jerry_port_log (JERRY_LOG_LEVEL_WARNING,
|
||||
"Ignoring 'start-debug-server' option because this feature is disabled!\n");
|
||||
}
|
||||
}
|
||||
else if (!strcmp ("--save-snapshot-for-global", argv[i])
|
||||
|| !strcmp ("--save-snapshot-for-eval", argv[i]))
|
||||
|
||||
Reference in New Issue
Block a user