aboutsummaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorPedro J. Estébanez2016-09-14 04:02:18 +0200
committerPedro J. Estébanez2016-09-14 04:02:18 +0200
commit66dac878ac9fc278044281b7f67fbed668e4523d (patch)
tree2f1b099566a50eb624215a14ff837ed2f828fc59 /tools/editor
parent6f7b2d277fc068264b72b0a39d464da03807c628 (diff)
downloadgodot-66dac878ac9fc278044281b7f67fbed668e4523d.tar.gz
godot-66dac878ac9fc278044281b7f67fbed668e4523d.tar.zst
godot-66dac878ac9fc278044281b7f67fbed668e4523d.zip
Improve debug focus behavior
Fix focusing debugged game on Windows Add re-focusing editor on continue
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/editor_node.h1
-rw-r--r--tools/editor/editor_run.cpp4
-rw-r--r--tools/editor/editor_run.h2
-rw-r--r--tools/editor/script_editor_debugger.cpp2
4 files changed, 9 insertions, 0 deletions
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index e6119cf57..e69063d56 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -690,6 +690,7 @@ public:
void notify_child_process_exited();
+ OS::ProcessID get_child_process_id() const { return editor_run.get_pid(); }
void stop_child_process();
Ref<Theme> get_editor_theme() const { return theme; }
diff --git a/tools/editor/editor_run.cpp b/tools/editor/editor_run.cpp
index fb0f24c08..5fbb4ae2a 100644
--- a/tools/editor/editor_run.cpp
+++ b/tools/editor/editor_run.cpp
@@ -52,6 +52,9 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
args.push_back("localhost:"+String::num(GLOBAL_DEF("debug/debug_port", 6007)));
}
+ args.push_back("-epid");
+ args.push_back(String::num(OS::get_singleton()->get_process_ID()));
+
if (p_custom_args!="") {
Vector<String> cargs=p_custom_args.split(" ",false);
@@ -132,6 +135,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
}
+
if (p_breakpoints.size()) {
args.push_back("-bp");
diff --git a/tools/editor/editor_run.h b/tools/editor/editor_run.h
index 0b96a2c91..5aa2adf80 100644
--- a/tools/editor/editor_run.h
+++ b/tools/editor/editor_run.h
@@ -53,6 +53,8 @@ public:
void run_native_notify() { status=STATUS_PLAY; }
void stop();
+ OS::ProcessID get_pid() const { return pid; }
+
void set_debug_collisions(bool p_debug);
bool get_debug_collisions() const;
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index da42f5409..694413cf1 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -216,6 +216,8 @@ void ScriptEditorDebugger::debug_continue() {
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected());
+ OS::get_singleton()->enable_for_stealing_focus(EditorNode::get_singleton()->get_child_process_id());
+
Array msg;
msg.push_back("continue");
ppeer->put_var(msg);