MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / debugger_detached

Function debugger_detached

Source/ScriptingEngine.cpp:120–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static 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
149void cScriptingEngine::debuggerEnable() {
150

Callers

nothing calls this directly

Calls 1

duk_trans_socket_finishFunction · 0.50

Tested by

no test coverage detected