So I'm just getting started with swift and I've had a couple problems.
I've downloaded everything according to the swift.org website, plus the visual studio stuff, I also tried getting the swift for windows software to compile it which didn't work.
Anyway here are the problems:
- When I try to run swift code in vscode and debug it I get this error
"cannot start debugging because no launch configuration has been provided"
So I add the configuration and it tells me variable ${workspacefolder} can't be resolved, so I edit it to the right directory
But it comes back and says it can't find the executable at ${C:\Users\dummy\Downloads\SwiftProject}/main.swift.exe
I don't know why its adding a .exe to the end of it.
I've installed the swift extension in vscode and I've got the CodeLLDB debugger extension, I saw someone say its meant to debug in binary or something and to try changing
"program": "${C:\Users\dummy\Downloads\SwiftProject}/main.swift",
to just "program": "${C:\Users\dummy\Downloads\SwiftProject}/main."
or to get rid of the program rule all together but that doesn't work either.
I hear mac is easier to use but I don't have a mac so unless I use a virtual machine for macOS or something then I don't know.
I saw someone say CodeLLDB isn't compatible with swift and you have to get an alternative version that is but I don't know where to find it.
Anyone know how to fix this?
Problem 2.
When using the swift for windows software to compile and run swift it says I have to compile before I can run the code so I try and compile it but I get this error:
"C:\Swift\bin\swiftc.exe" -swift-version 4 "C:\Users\dummy\Downloads\SwiftProject\main.swift" -o "C:\Swift\RuntimeEnv\main.exe"
C:\Swift\mingw64\bin\ld: cannot find C:\Users\dummy\AppData\Local\Programs\Swift\Platforms\5.10.0\Windows.platform\Developer\SDKs\Windows.sdk: Permission denied
Successfully compiled"
Not sure what any of that means or how to fix it. I've tried removing and reinstalling swift in the different ways that swift.org says you can but none of them work.