Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Removed example configs for Swift debugging to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Nov 21, 2019
1 parent 6012af2 commit 7af791a
Showing 1 changed file with 0 additions and 71 deletions.
71 changes: 0 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,77 +58,6 @@ If you prefer using an alternative language server, set set `sde.languageServerM

Though in most cases sourcekit-lsp and sourcekite should produce better results and performance.

## Debugging

SDE has a built-in Swift debugger which has been deprecated. Instead use [LLDB Debugger](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) which powers more features and is more stable.

Below is an example configuration supporting running executable targets, unit tests on macOS and Linux.
Relevant files will be compiled using the pre-launch-tasks.

```js
// .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
// Running executables
{
"type": "lldb",
"request": "launch",
"name": "Run your Executable",
"program": "${workspaceFolder}/.build/debug/your-executable",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "swift-build"
},
// Running unit tests
{
"type": "lldb",
"request": "launch",
"name": "Debug tests on macOS",
"program": "<path to xctest executable>", //For example /Applications/Xcode.app/Contents/Developer/usr/bin/xctest
"args": [
"${workspaceFolder}.build/debug/<xctest bundle name>.xctest"
],
"preLaunchTask": "swift-build-tests"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug tests on Linux",
"program": "./.build/x86_64-unknown-linux/debug/YourPackageTests.xctest",
"preLaunchTask": "swift-build-tests"
}
]
}
```

```js
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
// compile your SPM project
{
"label": "swift-build",
"type": "shell",
"command": "swift build" // for TensorFlow add -Xlinker -ltensorflow
},
// compile your SPM tests
{
"label": "swift-build-tests",
"type": "process",
"command": "swift",
"group": "build",
"args": [
"build",
"--build-tests"
// for TensorFlow add "-Xlinker", "-ltensorflow"
]
}
]
}
```

## Contributors

- Valentin Knabel, [@vknabel](https://github.com/vknabel), [twitter](https://twitter.com/vknabel), _maintainer_
Expand Down

0 comments on commit 7af791a

Please sign in to comment.