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

Method start

editor/debugger/script_editor_debugger.cpp:1210–1238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1208}
1209
1210void 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
1240void ScriptEditorDebugger::_update_buttons_state() {
1241 const bool active = is_session_active();

Callers

nothing calls this directly

Calls 7

TTRFunction · 0.85
ED_GET_SHORTCUTFunction · 0.85
get_project_metadataMethod · 0.80
set_enabledMethod · 0.45
is_nullMethod · 0.45
resetMethod · 0.45
set_profilingMethod · 0.45

Tested by

no test coverage detected