aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZsolt Borbély <zsborbely.u-szeged@partner.samsung.com>2017-03-30 10:38:03 +0200
committerLászló Langó <llango.u-szeged@partner.samsung.com>2017-03-30 10:38:03 +0200
commit394e265312b111c62869917721aaaf5800474b25 (patch)
tree798f6a8e8e9f5cd6ab3b6f03a55d84a6628ce8c7
parent7b0be3cae966deec3a8f69108c17e7eaf1b0c5d3 (diff)
Update the webpage (#1696)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
-rw-r--r--07.DEBUGGER.md124
1 files changed, 124 insertions, 0 deletions
diff --git a/07.DEBUGGER.md b/07.DEBUGGER.md
index 55083ab6..d28a9da5 100644
--- a/07.DEBUGGER.md
+++ b/07.DEBUGGER.md
@@ -79,3 +79,127 @@ the corresponding resource. In general it is always recommended to
use `jerry_parse_named_resource ()` when the resource name is
available because it silently ignores the resource name if the
debugger is disabled.
+
+## JerryScript debugger C-API interface
+
+The following section describes the debugger functions
+available for the host application.
+
+### jerry_debugger_is_connected
+
+**Summary**
+
+Returns true if a remote debugger client is connected.
+
+**Prototype**
+
+```c
+bool
+jerry_debugger_is_connected (void);
+```
+
+**Example**
+
+```c
+{
+ jerry_init (JERRY_INIT_DEBUGGER);
+
+ if (jerry_debugger_is_connected ())
+ {
+ printf ("A remote debugger client is connected.");
+ }
+}
+```
+
+### jerry_debugger_stop
+
+**Summary**
+
+Stops execution at the next available breakpoint if a remote
+debugger client is connected and the engine is not waiting at
+a breakpoint. The engine will stop regardless the breakpoint
+is enabled or not.
+
+**Prototype**
+
+```c
+void
+jerry_debugger_stop (void)
+```
+
+**Example**
+
+```c
+{
+ jerry_init (JERRY_INIT_DEBUGGER);
+
+ jerry_debugger_stop ();
+}
+```
+
+**See also**
+
+- [jerry_debugger_continue](#jerrydebuggercontinue)
+
+### jerry_debugger_continue
+
+**Summary**
+
+If the engine would stop at the next available breakpoint it
+cancels this effect. The engine will still stop at enabled
+breakpoints. This function effectively negates the effect of
+[jerry_debugger_stop ()](#jerrydebuggerstop) calls or stop
+requests issued by the debugger client.
+
+**Prototype**
+
+```c
+void
+jerry_debugger_continue (void)
+```
+
+**Example**
+
+```c
+{
+ jerry_init (JERRY_INIT_DEBUGGER);
+
+ jerry_debugger_continue ();
+}
+```
+
+**See also**
+
+- [jerry_debugger_stop](#jerrydebuggerstop)
+
+### jerry_debugger_disable_stop_at_breakpoint
+
+**Summary**
+
+Enables or disables stopping at breakpoints. When stopping is
+disabled all breakpoints are ignored including user enabled
+breakpoints. This allows hidden execution of ECMAScript code.
+
+**Prototype**
+
+```c
+void
+jerry_debugger_stop_at_breakpoint (bool enable_stop_at_breakpoint)
+```
+
+- `enable_stop_at_breakpoint` - enable (=`true`) or disable (=`false`) stopping at breakpoints
+
+**Example**
+
+```c
+{
+ jerry_init (JERRY_INIT_DEBUGGER);
+
+ jerry_debugger_stop_at_breakpoint (true);
+
+ // Protected execution of JavaScript code.
+ jerry_eval (...);
+
+ jerry_debugger_stop_at_breakpoint (false);
+}
+```