LSP: log startup Errors
This commit is contained in:
parent
634220e9fc
commit
1cf8691438
2 changed files with 18 additions and 12 deletions
|
|
@ -80,11 +80,14 @@ void DebugAdapterServer::_notification(int p_what) {
|
|||
|
||||
void DebugAdapterServer::start() {
|
||||
remote_port = (DebugAdapterServer::port_override > -1) ? DebugAdapterServer::port_override : (int)_EDITOR_GET("network/debug_adapter/remote_port");
|
||||
if (protocol.start(remote_port, IPAddress("127.0.0.1")) == OK) {
|
||||
EditorNode::get_log()->add_message("--- Debug adapter server started on port " + itos(remote_port) + " ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
set_process_internal(true);
|
||||
started = true;
|
||||
const Error status = protocol.start(remote_port, IPAddress("127.0.0.1"));
|
||||
if (status != OK) {
|
||||
EditorNode::get_log()->add_message("--- Failed to start Debug adapter server on port " + itos(remote_port) + ": " + error_names[status] + " ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
return;
|
||||
}
|
||||
EditorNode::get_log()->add_message("--- Debug adapter server started on port " + itos(remote_port) + " ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
set_process_internal(true);
|
||||
started = true;
|
||||
}
|
||||
|
||||
void DebugAdapterServer::stop() {
|
||||
|
|
|
|||
|
|
@ -90,15 +90,18 @@ void GDScriptLanguageServer::start() {
|
|||
port = (GDScriptLanguageServer::port_override > -1) ? GDScriptLanguageServer::port_override : (int)_EDITOR_GET("network/language_server/remote_port");
|
||||
use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
|
||||
poll_limit_usec = (int)_EDITOR_GET("network/language_server/poll_limit_usec");
|
||||
if (GDScriptLanguageProtocol::get_singleton()->start(port, IPAddress(host)) == OK) {
|
||||
EditorNode::get_log()->add_message("--- GDScript language server started on port " + itos(port) + " ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
if (use_thread) {
|
||||
thread_running = true;
|
||||
thread.start(GDScriptLanguageServer::thread_main, this);
|
||||
}
|
||||
set_process_internal(!use_thread);
|
||||
started = true;
|
||||
const Error status = GDScriptLanguageProtocol::get_singleton()->start(port, IPAddress(host));
|
||||
if (status != OK) {
|
||||
EditorNode::get_log()->add_message("--- Failed to start GDScript language server on port " + itos(port) + ": " + error_names[status] + " ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
return;
|
||||
}
|
||||
EditorNode::get_log()->add_message("--- GDScript language server started on port " + itos(port) + " ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
if (use_thread) {
|
||||
thread_running = true;
|
||||
thread.start(GDScriptLanguageServer::thread_main, this);
|
||||
}
|
||||
set_process_internal(!use_thread);
|
||||
started = true;
|
||||
}
|
||||
|
||||
void GDScriptLanguageServer::stop() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue