godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.14k stars 19.96k forks source link

Debug Server #94227

Open Cris-lml007 opened 1 month ago

Cris-lml007 commented 1 month ago

Tested versions

v4.2.2.stable.official [15073afe3]

System information

Debian Linux

Issue description

I have godot configured with an external editor (Neovim) using LSP provided by port 6005, I recently configured DAP that works through port 6006 and up to that point it works fine, but I can't get port 6007 to work, I have to try to see the list ports when listening does not appear (netstat -tuln), also look at the https://github.com/godotengine/godot-vscode-plugin plugin developed for vscode, this indicates the following parameters:

{
    "name": "Launch",
    "type": "godot",
    "request": "launch",
    "project": "${workspaceFolder}",
    "address": "127.0.0.1",
    "port": 6007,
    "scene": "main|current|pinned|<path>",
    "editor_path": "<path>",
    // engine command line flags
    "profiling": false,
    "single_threaded_scene": false,
    "debug_collisions": false,
    "debug_paths": false,
    "debug_navigation": false,
    "debug_avoidance": false,
    "debug_stringnames": false,
    "frame_delay": 0,
    "time_scale": 1.0,
    "disable_vsync": false,
    "fixed_fps": 60,
    // anything else
    "additional_options": ""
}

I tried to study how the execution of specific scenes works, but I can't make any work other than the scene defined as the main one.
This way I have my DAP client (vimspector) configured which I try to run or I think the vscode plugin runs the specific scenes.

{
    "configurations": {
        "Godot: Attach": {
            "adapter": "godot",
            "configuration": {
                "name": "Godot: Attach",
                "type": "godot",
                "request": "launch"
            }
        }
    },
    "adapters": {
        "godot": {
            "type": "server",
            "host": "127.0.0.1",
            "port": 6006
        }
    }
}

Steps to reproduce

netstat -tuln

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:6006          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:6005          0.0.0.0:*               LISTEN  
...

Godot output
image

Minimal reproduction project (MRP)

image

Calinou commented 1 month ago

The editor debugger uses port 6007 by default to communicate with the running project. This is why you can't use it for the LSP at the same time.

Cris-lml007 commented 1 month ago

but port 6007 is not active at any time, I do not have any firewall installed, I even tried to activate it from the terminal but without success.

godot --debug-server tcp://127.0.0.1:6007

even try changing the port to see if there are any problems on port 6007.

godot --debug-server tcp://127.0.0.1:9000