在 VSCode 中运行 Swift 需要使用 Swift 编译器来编译和执行代码。因此,在 tasks.json 中 "command" 命令中需要使用 "swift" 命令来编译和运行代码。
示例:
"command": "swift",
"args": [
"${file}",
],
这样就可以在 VSCode 中运行 Swift 代码了。
在 VSCode 中运行 Swift 需要使用 Swift 编译器来编译和执行代码。因此,在 tasks.json 中 "command" 命令中需要使用 "swift" 命令来编译和运行代码。
示例:
"command": "swift",
"args": [
"${file}",
],
这样就可以在 VSCode 中运行 Swift 代码了。