Worked with student again on his computer. We ended up deleting values in PATH environment variable for other Swift Toolchains after we installed the Swift 6 toolchain. We can run tests for a package, but can't debug. For an executable (swift package init --type executable), we can run it using the Terminal with "swift run" to see the output there, but can't debug (although I could on my borrowed computer).
We also went into the VSCode extensions for Swift and CodeLLDB and put the path to the Swift 6 Toolchain in the appropriate locations.
So if anyone knows how to get the debugger to work in Swift Packages (especially with tests for a Package), I'd appreciate ideas for that.
Here's the message we get in the error log about Rust:
type: 'lldb',
request: 'launch',
sourceLanguages: [ 'swift' ],
args: [],
cwd: '${workspaceFolder:NewExe}',
name: 'Debug NewExe',
program: '${workspaceFolder:NewExe}\\.build\\debug\\NewExe.exe',
preLaunchTask: 'swift: Build Debug NewExe',
__configurationTarget: 6
}
Resolved debug configuration: {
type: 'lldb',
request: 'launch',
sourceLanguages: [ 'swift' ],
args: [],
cwd: '${workspaceFolder:NewExe}',
name: 'Debug NewExe',
program: '${workspaceFolder:NewExe}\\.build\\debug\\NewExe.exe',
preLaunchTask: 'swift: Build Debug NewExe',
__configurationTarget: 6,
env: { RUST_BACKTRACE: '1' },
expressions: 'native',
relativePathBase: 'c:\\Users\\dgoen\\Desktop\\NewExe',
_adapterSettings: {
displayFormat: 'auto',
showDisassembly: 'auto',
dereferencePointers: true,
suppressMissingSourceFiles: true,
evaluationTimeout: 5,
consoleMode: 'commands',
sourceLanguages: null,
terminalPromptClear: null,
evaluateForHovers: true,
commandCompletions: true,
reproducer: false
}
}
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Could not load \"C:\\\\Users\\\\dgoen\\\\AppData\\\\Local\\\\Programs\\\\Swift\\\\Toolchains\\\\6.0.0+Asserts\\\\usr\\\\bin\\\\liblldb.dll\" (err=0x0000007E)"', adapter\codelldb\bin/main.rs:57:57
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Debug adapter exit code=101 (0x65), signal=null.