You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Merge pull request #97758 from TsFreddie/debugger-stepout
Add step out to script debugger
This commit is contained in:
@@ -111,6 +111,13 @@ void ScriptEditorDebugger::debug_ignore_error_breaks() {
|
||||
_put_msg("set_ignore_error_breaks", msg);
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::debug_out() {
|
||||
ERR_FAIL_COND(!is_breaked());
|
||||
|
||||
_put_msg("out", Array(), debugging_thread_id);
|
||||
_clear_execution();
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::debug_next() {
|
||||
ERR_FAIL_COND(!is_breaked());
|
||||
|
||||
@@ -1084,6 +1091,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
||||
copy->set_button_icon(get_editor_theme_icon(SNAME("ActionCopy")));
|
||||
step->set_button_icon(get_editor_theme_icon(SNAME("DebugStep")));
|
||||
next->set_button_icon(get_editor_theme_icon(SNAME("DebugNext")));
|
||||
out->set_button_icon(get_editor_theme_icon(SNAME("DebugOut")));
|
||||
dobreak->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
|
||||
docontinue->set_button_icon(get_editor_theme_icon(SNAME("DebugContinue")));
|
||||
vmem_notice_icon->set_texture(get_editor_theme_icon(SNAME("NodeInfo")));
|
||||
@@ -1256,6 +1264,7 @@ void ScriptEditorDebugger::_update_buttons_state() {
|
||||
vmem_refresh->set_disabled(!active);
|
||||
step->set_disabled(!active || !is_breaked() || !is_debuggable());
|
||||
next->set_disabled(!active || !is_breaked() || !is_debuggable());
|
||||
out->set_disabled(!active || !is_breaked() || !is_debuggable());
|
||||
copy->set_disabled(!active || !is_breaked());
|
||||
docontinue->set_disabled(!active || !is_breaked());
|
||||
dobreak->set_disabled(!active || is_breaked());
|
||||
@@ -2090,6 +2099,13 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
next->set_shortcut(ED_GET_SHORTCUT("debugger/step_over"));
|
||||
next->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_next));
|
||||
|
||||
out = memnew(Button);
|
||||
out->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc->add_child(out);
|
||||
out->set_tooltip_text(TTRC("Step Out"));
|
||||
out->set_shortcut(ED_GET_SHORTCUT("debugger/step_out"));
|
||||
out->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_out));
|
||||
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
dobreak = memnew(Button);
|
||||
|
||||
Reference in New Issue
Block a user