mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Adds skip-breakpoints feature
This commit is contained in:
parent
750f8d4926
commit
617797c47c
16 changed files with 271 additions and 15 deletions
|
@ -201,6 +201,21 @@ void ScriptEditorDebugger::debug_copy() {
|
|||
OS::get_singleton()->set_clipboard(msg);
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::debug_skip_breakpoints() {
|
||||
skip_breakpoints_value = !skip_breakpoints_value;
|
||||
if (skip_breakpoints_value)
|
||||
skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOn", "EditorIcons"));
|
||||
else
|
||||
skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
|
||||
|
||||
if (connection.is_valid()) {
|
||||
Array msg;
|
||||
msg.push_back("set_skip_breakpoints");
|
||||
msg.push_back(skip_breakpoints_value);
|
||||
ppeer->put_var(msg);
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::debug_next() {
|
||||
|
||||
ERR_FAIL_COND(!breaked);
|
||||
|
@ -1083,7 +1098,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||
case NOTIFICATION_ENTER_TREE: {
|
||||
|
||||
inspector->edit(variables);
|
||||
|
||||
skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
|
||||
copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
|
||||
|
||||
step->set_icon(get_icon("DebugStep", "EditorIcons"));
|
||||
|
@ -1785,6 +1800,10 @@ void ScriptEditorDebugger::reload_scripts() {
|
|||
}
|
||||
}
|
||||
|
||||
bool ScriptEditorDebugger::is_skip_breakpoints() {
|
||||
return skip_breakpoints_value;
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::_error_activated() {
|
||||
TreeItem *selected = error_tree->get_selected();
|
||||
|
||||
|
@ -1980,6 +1999,7 @@ void ScriptEditorDebugger::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(D_METHOD("_stack_dump_frame_selected"), &ScriptEditorDebugger::_stack_dump_frame_selected);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("debug_skip_breakpoints"), &ScriptEditorDebugger::debug_skip_breakpoints);
|
||||
ClassDB::bind_method(D_METHOD("debug_copy"), &ScriptEditorDebugger::debug_copy);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("debug_next"), &ScriptEditorDebugger::debug_next);
|
||||
|
@ -2067,6 +2087,13 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
|
|||
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
skip_breakpoints = memnew(ToolButton);
|
||||
hbc->add_child(skip_breakpoints);
|
||||
skip_breakpoints->set_tooltip(TTR("Skip Breakpoints"));
|
||||
skip_breakpoints->connect("pressed", this, "debug_skip_breakpoints");
|
||||
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
copy = memnew(ToolButton);
|
||||
hbc->add_child(copy);
|
||||
copy->set_tooltip(TTR("Copy Error"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue