This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

Hi all, So I'm running VSCodium (same as VScode, but without the microsoft spyware).
Debugging used to work in Godot 3.x but I can't seem to get the launch.json file to work correctly.

    "configurations": [
    {
      "name": "Debug Godot 4",
      "type": "godot-mono",
      "request": "launch",
      "mode": "executable",
      "preLaunchTask": "build",
      "executable": "/home/scott/Various/Godot_v4.0-beta12_mono_linux_x86_64/Godot_v4.0-beta12_mono_linux.x86_64",
      "executableArguments": [
        "--path",
        "${workspaceRoot}"
      ]
    }
  ]

tasks.json...

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "build",
      "command": "/home/scott/Various/Godot_v4.0-beta12_mono_linux_x86_64/Godot_v4.0-beta12_mono_linux.x86_64",
      "type": "process",
      "args": [
        "--build-solutions",
        "--path",
        "${workspaceRoot}",
        "--no-window",
        "-q"
      ],
      "problemMatcher": "$msCompile"
    }
  ]
}

Does that look right?
The "executable" bit is where my Godot 4 Executable is, any ideas anyone?
Many thanks!
UPDATE: Fiddling about I'm now getting:

Invalid debug host address, it should be of the form <protocol>://<host/IP>:<port>

UPDATE: Now on stable 4 MONO. Got 3 launchers and none of them work.

Godot version 4 stable MONO
in Engine by (52 points)
edited by

Thanks for that, it certainly seems very likely to be the cause. Microsoft going out of they're way again to make things worse.
I'm probably going to go back to Godot 3.x until things are more stable. Cheers!

1 Answer

+1 vote

Try add a protocol string to front of address in launch.json file.

  "configurations": [
  {
    "name": "GDScript Godot",
    "type": "godot",
    "request": "launch",
    "project": "${workspaceFolder}",
    "port": 6007,
    "address": "http://127.0.0.1",  //<---- add protocol
    "launch_game_instance": true,
    "launch_scene": false
}

I can launch app from vscode. But breakpoint is not working yet.

by (16 points)
edited by

I'm not getting any errors now, it looks like it's launching it, but nothing happens.
I am using Godot 4 stable mono, not the regular GDscript version.
It is showing some warnings though:
property 'project' is not allowed, and the same for 'port', 'address', 'launchgameinstance' and 'launch_scene'

Also, VScodium will let me select and auto generate a 'Godot Mono C# Launch' which generates this code:

{
            "name": "Play in Editor",
            "type": "godot-mono",
            "mode": "playInEditor",
            "request": "launch"
}
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.