| 375 | } |
| 376 | |
| 377 | void ScriptEditorDebugger::_msg_debug_exit(uint64_t p_thread_id, const Array &p_data) { |
| 378 | threads_debugged.erase(p_thread_id); |
| 379 | if (p_thread_id == debugging_thread_id) { |
| 380 | _clear_execution(); |
| 381 | if (threads_debugged.is_empty()) { |
| 382 | debugging_thread_id = Thread::UNASSIGNED_ID; |
| 383 | } else { |
| 384 | // Find next thread to debug. |
| 385 | uint32_t min_order = 0xFFFFFFFF; |
| 386 | uint64_t next_thread = Thread::UNASSIGNED_ID; |
| 387 | for (KeyValue<uint64_t, ThreadDebugged> T : threads_debugged) { |
| 388 | if (T.value.debug_order < min_order) { |
| 389 | min_order = T.value.debug_order; |
| 390 | next_thread = T.key; |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | debugging_thread_id = next_thread; |
| 395 | } |
| 396 | |
| 397 | if (debugging_thread_id == Thread::UNASSIGNED_ID) { |
| 398 | // Nothing else to debug. |
| 399 | profiler->set_enabled(true, false); |
| 400 | profiler->disable_seeking(); |
| 401 | |
| 402 | visual_profiler->set_enabled(true); |
| 403 | |
| 404 | _set_reason_text(TTR("Execution resumed."), MESSAGE_SUCCESS); |
| 405 | emit_signal(SNAME("breaked"), false, false, "", false); |
| 406 | |
| 407 | _update_buttons_state(); |
| 408 | } else { |
| 409 | _thread_debug_enter(debugging_thread_id); |
| 410 | } |
| 411 | } else { |
| 412 | _update_buttons_state(); |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | void ScriptEditorDebugger::_msg_set_pid(uint64_t p_thread_id, const Array &p_data) { |
| 417 | ERR_FAIL_COND(p_data.is_empty()); |
nothing calls this directly
no test coverage detected