summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-02-25 22:48:15 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-03-08 12:16:09 +0100
commitd0009636df6544dd26ab7c568a0244af6a20634a (patch)
tree1e50d1e9680a5a118d414b91502acdfa31095dae /main/main.cpp
parent540ca05a80e23daafa191cdf24c07b3f8e37b47a (diff)
ScriptDebuggerRemote use threads
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/main/main.cpp b/main/main.cpp
index d8a9cc87a7..cc0e991dcd 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -897,20 +897,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if (debug_mode == "remote") {
- ScriptDebuggerRemote *sdr = memnew(ScriptDebuggerRemote);
- uint16_t debug_port = 6007;
- if (debug_host.find(":") != -1) {
- int sep_pos = debug_host.find_last(":");
- debug_port = debug_host.substr(sep_pos + 1, debug_host.length()).to_int();
- debug_host = debug_host.substr(0, sep_pos);
- }
- Error derr = sdr->connect_to_host(debug_host, debug_port);
-
- sdr->set_skip_breakpoints(skip_breakpoints);
-
- if (derr != OK) {
- memdelete(sdr);
- } else {
+ ScriptDebuggerRemote *sdr = ScriptDebuggerRemote::create_for_uri(debug_host);
+ if (sdr) {
+ sdr->set_skip_breakpoints(skip_breakpoints);
script_debugger = sdr;
}
} else if (debug_mode == "local") {