| 118 | } |
| 119 | |
| 120 | static void debugger_detached(duk_context *ctx, void *udata) { |
| 121 | #ifdef OF_JS_DEBUG |
| 122 | fprintf(stderr, "Debugger detached, udata: %p\n", (void *)udata); |
| 123 | fflush(stderr); |
| 124 | |
| 125 | /* Ensure socket is closed even when detach is initiated by Duktape |
| 126 | * rather than debug client. |
| 127 | */ |
| 128 | duk_trans_socket_finish(); |
| 129 | /* |
| 130 | if (debugger_reattach) { |
| 131 | // For automatic reattach testing. |
| 132 | duk_trans_socket_init(); |
| 133 | duk_trans_socket_waitconn(); |
| 134 | fprintf(stderr, "Debugger reconnected, call duk_debugger_attach()\n"); |
| 135 | fflush(stderr); |
| 136 | duk_debugger_attach(ctx, |
| 137 | duk_trans_socket_read_cb, |
| 138 | duk_trans_socket_write_cb, |
| 139 | duk_trans_socket_peek_cb, |
| 140 | duk_trans_socket_read_flush_cb, |
| 141 | duk_trans_socket_write_flush_cb, |
| 142 | debugger_request, |
| 143 | debugger_detached, |
| 144 | NULL); |
| 145 | }*/ |
| 146 | #endif |
| 147 | } |
| 148 | |
| 149 | void cScriptingEngine::debuggerEnable() { |
| 150 |
nothing calls this directly
no test coverage detected