Godot 4.x - Mono - Linux - how to debug using VScode?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Satscape

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.

Hi Satscape,
could this be related:
https://wiki.archlinux.org/title/Visual_Studio_Code#Unable_to_debug_C#

juppi | 2023-01-21 13:47

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!

Satscape | 2023-01-21 14:23

:bust_in_silhouette: Reply From: yskang

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.

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’, ‘launch_game_instance’ 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"
}

Satscape | 2023-03-08 10:38