mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
32 lines
1.1 KiB
name: duk_debugger_pause
|
|
|
|
proto: |
|
|
void duk_debugger_pause(duk_context *ctx);
|
|
|
|
summary: |
|
|
<p>Request a debugger pause as soon as possible and return without blocking.
|
|
The pause will be triggered the next time Ecmascript bytecode is executed,
|
|
which is usually almost immediate. However, if a native call such as a
|
|
Duktape/C function is in progress or no Ecmascript code is currently
|
|
executing, it may take longer for the pause to take effect.</p>
|
|
|
|
<p>The call is a no-op if (1) debugger support has not been compiled in, (2)
|
|
the debugger is not attached, or (3) Duktape is already paused. This mimics
|
|
the semantics of the Ecmascript <code>debugger</code> statement.</p>
|
|
|
|
<div class="note">
|
|
Like all Duktape API calls, this call is not thread safe. It may be tempting
|
|
to trigger a pause from a thread different than one running Ecmascript code
|
|
for the context, but this is unsafe and not currently supported.
|
|
</div>
|
|
|
|
example: |
|
|
/* In your event loop: */
|
|
if (key_pressed == KEY_F12) {
|
|
duk_debugger_pause(ctx);
|
|
}
|
|
|
|
tags:
|
|
- debugger
|
|
|
|
introduced: 1.5.0
|
|
|