| 297 | } |
| 298 | |
| 299 | void EditorDebuggerNode::stop(bool p_force) { |
| 300 | if (keep_open && !p_force) { |
| 301 | return; |
| 302 | } |
| 303 | |
| 304 | remote_scene_tree_wait = false; |
| 305 | inspect_edited_object_wait = false; |
| 306 | |
| 307 | current_uri.clear(); |
| 308 | if (server.is_valid()) { |
| 309 | server->stop(); |
| 310 | EditorNode::get_log()->add_message("--- Debugging process stopped ---", EditorLog::MSG_TYPE_EDITOR); |
| 311 | |
| 312 | if (EditorRunBar::get_singleton()->is_movie_maker_enabled()) { |
| 313 | // Request attention in case the user was doing something else when movie recording is finished. |
| 314 | DisplayServer::get_singleton()->window_request_attention(); |
| 315 | } |
| 316 | |
| 317 | server.unref(); |
| 318 | } |
| 319 | |
| 320 | // Also close all debugging sessions. |
| 321 | _for_all(tabs, [&](ScriptEditorDebugger *dbg) { |
| 322 | if (dbg->is_session_active()) { |
| 323 | dbg->_stop_and_notify(); |
| 324 | } |
| 325 | }); |
| 326 | _break_state_changed(); |
| 327 | breakpoints.clear(); |
| 328 | EditorUndoRedoManager::get_singleton()->clear_history(EditorUndoRedoManager::REMOTE_HISTORY, false); |
| 329 | set_process(false); |
| 330 | } |
| 331 | |
| 332 | void EditorDebuggerNode::_notification(int p_what) { |
| 333 | switch (p_what) { |
nothing calls this directly
no test coverage detected