| 1208 | } |
| 1209 | |
| 1210 | void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) { |
| 1211 | _clear_errors_list(); |
| 1212 | stop(); |
| 1213 | |
| 1214 | profiler->set_enabled(true, true); |
| 1215 | visual_profiler->set_enabled(true); |
| 1216 | |
| 1217 | peer = p_peer; |
| 1218 | ERR_FAIL_COND(p_peer.is_null()); |
| 1219 | |
| 1220 | performance_profiler->reset(); |
| 1221 | |
| 1222 | set_process(true); |
| 1223 | camera_override = CameraOverride::OVERRIDE_NONE; |
| 1224 | |
| 1225 | _set_reason_text(TTR("Debug session started."), MESSAGE_SUCCESS); |
| 1226 | _update_buttons_state(); |
| 1227 | |
| 1228 | Array quit_keys = DebuggerMarshalls::serialize_key_shortcut(ED_GET_SHORTCUT("editor/stop_running_project")); |
| 1229 | _put_msg("scene:setup_scene", quit_keys); |
| 1230 | |
| 1231 | if (EditorSettings::get_singleton()->get_project_metadata("debug_options", "autostart_profiler", false)) { |
| 1232 | profiler->set_profiling(true); |
| 1233 | } |
| 1234 | |
| 1235 | if (EditorSettings::get_singleton()->get_project_metadata("debug_options", "autostart_visual_profiler", false)) { |
| 1236 | visual_profiler->set_profiling(true); |
| 1237 | } |
| 1238 | } |
| 1239 | |
| 1240 | void ScriptEditorDebugger::_update_buttons_state() { |
| 1241 | const bool active = is_session_active(); |
nothing calls this directly
no test coverage detected