Setting up launch.json for Swift in VSCode for Windows

140 Views Asked by At

I'm learning some basic Swift but don't have a Mac yet, so I'm using Visual Studio Code on a Windows device. I was running Python programs just fine before, but I recently ran into a problem that has spread to all of my files in a variety of languages. Whenever I try to run a program, I get two messages: One that says "Unable to resolve ${workspaceFolder} in configuration ("workspaceFolder")", and for Swift programs, "Activating Swift extension failed: Failed to find swift executable". For Swift, I am also using the CodeLLDB extension as a debugger.

Does someone have a clue as to what is going on? The launch.json file is attached as an image.launch.json file

I tried to customize the settings.json file by using the CodeLLDB-provided configuration template, but I can't figure out how exactly to use it. Using the file path provided in the launch.json file, can someone help me figure out what is the right path format?

{
    "workbench.colorTheme": "Default High Contrast",
    "launch": {
        "configurations": [
            {
                "type": "lldb",
                "request": "launch",
                "name": "Launch",
                "program": "${workspaceFolder}/<program>",
                "args": [],
                "cwd": "${workspaceFolder}"
            },
        
        ]
    }
}
0

There are 0 best solutions below