MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _msg_debug_enter

Method _msg_debug_enter

editor/debugger/script_editor_debugger.cpp:347–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347void ScriptEditorDebugger::_msg_debug_enter(uint64_t p_thread_id, const Array &p_data) {
348 ERR_FAIL_COND(p_data.size() != 4);
349
350 const Thread::ID caller_id = p_data[3];
351
352 ThreadDebugged td;
353 td.name = (caller_id == Thread::get_main_id()) ? TTR("Main Thread") : itos(caller_id);
354 td.error = p_data[1];
355 td.can_debug = p_data[0];
356 td.has_stackdump = p_data[2];
357 td.thread_id = p_thread_id;
358 static uint32_t order_inc = 0;
359 td.debug_order = order_inc++;
360
361 threads_debugged.insert(p_thread_id, td);
362
363 if (threads_debugged.size() == 1) {
364 // First thread that requests debug
365 debugging_thread_id = p_thread_id;
366 _thread_debug_enter(p_thread_id);
367 can_request_idle_draw = true;
368 if (is_move_to_foreground()) {
369 DisplayServer::get_singleton()->window_move_to_foreground();
370 }
371 profiler->set_enabled(false, false);
372 visual_profiler->set_enabled(false);
373 }
374 _update_buttons_state();
375}
376
377void ScriptEditorDebugger::_msg_debug_exit(uint64_t p_thread_id, const Array &p_data) {
378 threads_debugged.erase(p_thread_id);

Callers

nothing calls this directly

Calls 6

TTRFunction · 0.85
itosFunction · 0.85
sizeMethod · 0.65
insertMethod · 0.45
set_enabledMethod · 0.45

Tested by

no test coverage detected