You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Implement Autostart Feature for Profiler / Visual Profiler / Network Profiler
Co-authored-by: stmSi <stm1998sithumyo@gmail.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user