VS Code Launch.json

Godot Version

4.2

Question

Currently trying to get Godot to launch from VS Code but all attempts have ended in failure. It will build but then fail to launch.

 "version": "0.2.0",
    "configurations": [
        {
            "name": "Play in Editor",
            "type": "godot-mono",
            "mode": "playInEditor",
            "request": "launch"
        },
        {
            "name": "Launch",
            "type": "godot-mono",
            "request": "launch",
            "mode": "executable",
            "preLaunchTask": "build",
            "executable": "c:/Users/travi/Downloads/Godot_v4.2.1-stable_mono_win64/Godot_v4.2.1-stable_mono_win64/Godot_v4.2.1-stable_mono_win64.exe",
            "executableArguments": [
                "--path",
                "${workspaceRoot}"
            ]
        },
        {
            "name": "Launch (Select Scene)",
            "type": "godot-mono",
            "request": "launch",
            "mode": "executable",
            "preLaunchTask": "build",
            "executable": "<insert-godot-executable-path-here>",
            "executableArguments": [
                "--path",
                "${workspaceRoot}",
                "${command:SelectLaunchScene}"
            ]
        },
        {
            "name": "Attach",
            "type": "godot-mono",
            "request": "attach",
            "address": "localhost",
            "port": 23685
        }
    ]
}
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run Godot",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "D:/Godot_v4.2.1-stable_mono_win64/Godot_v4.2.1-stable_mono_win64.exe",
            "cwd" : "${workspaceFolder}",
            "console": "internalConsole",
            "stopAtEntry": false,
            "args": ["--path","${workspaceRoot}"]

        }
    ]
}
1 Like

That results in this output.

Executing task: scons dev_build=yes

scons : The term ‘scons’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • scons dev_build=yes
  •   + CategoryInfo          : ObjectNotFound: (scons:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException