diff options
Diffstat (limited to 'editor/debugger/script_editor_debugger.cpp')
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 5e96daf69c..b798bdf9c1 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -1012,6 +1012,14 @@ void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) { _set_reason_text(TTR("Debug session started."), MESSAGE_SUCCESS); _update_buttons_state(); emit_signal(SNAME("started")); + + if (EditorSettings::get_singleton()->get_project_metadata("debug_options", "autostart_profiler", false)) { + profiler->set_profiling(true); + } + + if (EditorSettings::get_singleton()->get_project_metadata("debug_options", "autostart_visual_profiler", false)) { + visual_profiler->set_profiling(true); + } } void ScriptEditorDebugger::_update_buttons_state() { @@ -1076,10 +1084,10 @@ void ScriptEditorDebugger::stop() { profiler_signature.clear(); profiler->set_enabled(false, false); - profiler->set_pressed(false); + profiler->set_profiling(false); visual_profiler->set_enabled(false); - visual_profiler->set_pressed(false); + visual_profiler->set_profiling(false); inspector->edit(nullptr); _update_buttons_state(); |