| 345 | } |
| 346 | |
| 347 | void 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 | |
| 377 | void ScriptEditorDebugger::_msg_debug_exit(uint64_t p_thread_id, const Array &p_data) { |
| 378 | threads_debugged.erase(p_thread_id); |
nothing calls this directly
no test coverage detected