{ "name": "swift-vscode", "displayName": "Swift", "description": "Swift Language Support for Visual Studio Code.", "version": "2.18.0-dev", "api-version": "1.0.0", "publisher": "swiftlang", "icon": "icon.png", "repository": { "type": "git", "url": "https://github.com/swiftlang/vscode-swift" }, "engines": { "vscode": "^1.88.0" }, "categories": [ "Programming Languages", "Debuggers", "Snippets", "Testing" ], "keywords": [ "swift", "swiftlang", "sswg" ], "activationEvents": [ "onLanguage:swift", "workspaceContains:**/Package.swift", "workspaceContains:**/compile_commands.json", "workspaceContains:**/compile_flags.txt", "workspaceContains:**/buildServer.json", "workspaceContains:**/.bsp/*.json", "onDebugResolve:swift-lldb", "onDebugResolve:swift" ], "main": "./dist/src/extension.js", "contributes": { "walkthroughs": [ { "id": "swift-welcome", "title": "Get Started with Swift for VS Code", "description": "Learn how to use the Swift extension for VS Code.", "steps": [ { "id": "installing-mac", "title": "Install Swift", "description": "Swift is cross-platform! If you already have Xcode installed, you're ready to go. Otherwise, see the instructions to [install on macOS](https://www.swift.org/install).\n Swift is [open source](https://github.com/swiftlang) and community driven!\n Questions? Visit the [Swift forums](https://forums.swift.org/) or the [Swift extension GitHub page](https://github.com/swiftlang/vscode-swift) for help.", "media": { "markdown": "./assets/walkthrough/welcome.md" }, "when": "isMac" }, { "id": "installing-linux", "title": "Installing Swift", "description": "Swift is cross-platform! See the instructions to [install on Linux](https://www.swift.org/install).\n Swift is [open source](https://github.com/swiftlang) and community driven!\n Questions? Visit the [Swift forums](https://forums.swift.org/) or the [Swift extension GitHub page](https://github.com/swiftlang/vscode-swift) for help.", "media": { "markdown": "./assets/walkthrough/welcome.md" }, "when": "isLinux" }, { "id": "installing-windows", "title": "Installing Swift", "description": "Swift is cross-platform! See the instructions to [install on Windows](https://www.swift.org/install).\n Swift is [open source](https://github.com/swiftlang) and community driven!\n Questions? Visit the [Swift forums](https://forums.swift.org/) or the [Swift extension GitHub page](https://github.com/swiftlang/vscode-swift) for help.", "media": { "markdown": "./assets/walkthrough/welcome.md" }, "when": "isWindows" }, { "id": "creating-new-project", "title": "Create a Swift project", "description": "You can create a new Swift project with \n``Swift: Create New Project``\n in the Command Palette. \n[Try it out](command:swift.createNewProject)", "media": { "markdown": "assets/walkthrough/createNewProject.md" } }, { "id": "run-and-debug-executable", "title": "Run and debug an executable", "description": "You can run an executable from the Swift file, Command Palette or the Project Panel.", "media": { "markdown": "assets/walkthrough/runExecutable.md" } }, { "id": "testing", "title": "Run tests", "description": "Tests are automatically discovered in your project and added to the [Testing View](https://code.visualstudio.com/docs/debugtest/testing#_automatic-test-discovery-in-testing-view).\n Both [XCTest](https://developer.apple.com/documentation/xctest) and [Swift Testing](https://developer.apple.com/xcode/swift-testing/) tests are supported.", "media": { "markdown": "assets/walkthrough/runTests.md" } }, { "id": "documentation", "title": "Preview DocC documentation", "description": "Preview documentation written in [DocC](https://www.swift.org/documentation/docc/).", "media": { "markdown": "assets/walkthrough/previewDocs.md" } }, { "id": "swift-commands", "title": "Swift commands", "description": "Explore commands available in the Command Palette prefixed with ``> Swift:``\n See documentation for [available commands](https://docs.swift.org/vscode/documentation/userdocs/commands/). \n[Show Swift Commands](command:swift.showCommands)", "media": { "markdown": "assets/walkthrough/swiftCommands.md" } }, { "id": "selecting-toolchain", "title": "Select a toolchain", "description": "If you have more than one Swift toolchain installed you can switch between them with \n``Swift: Select Toolchain...``\n in the Command Palette.\n[Select Toolchain](command:swift.selectToolchain)", "markdown": "", "media": { "markdown": "assets/walkthrough/swiftToolchains.md" } }, { "id": "customize", "title": "Customize settings", "description": "The Swift extensions contributes numerous settings that you can configure to customize how your project builds and how the extension operates.\n[Configure Swift Settings](command:swift.configureSettings)", "media": { "markdown": "assets/walkthrough/customizeSettings.md" } } ] } ], "icons": { "swift-icon": { "description": "The official icon for the Swift programming language", "default": { "fontPath": "assets/icons/icon-font.woff", "fontCharacter": "\\E001" } }, "swift-documentation": { "description": "The icon for the Swift documentation preview editor", "default": { "fontPath": "assets/icons/icon-font.woff", "fontCharacter": "\\E002" } }, "swift-documentation-preview": { "description": "The icon used as a button for showing the Swift documentation preview editor", "default": { "fontPath": "assets/icons/icon-font.woff", "fontCharacter": "\\E003" } } }, "terminal": { "profiles": [ { "title": "Swift", "id": "swift.terminalProfile" } ] }, "languages": [ { "id": "swift", "aliases": [ "Swift" ], "extensions": [ ".swiftinterface", ".swift" ] }, { "id": "tutorial", "aliases": [ "Tutorial" ], "filenamePatterns": [ "*.tutorial" ] }, { "id": "swift-gyb", "aliases": [ "Swift GYB" ], "extensions": [ ".swift.gyb" ], "configuration": "./swift-gyb.language-configuration.json" } ], "grammars": [ { "language": "swift-gyb", "scopeName": "source.swift.gyb", "path": "./syntaxes/swift-gyb.tmLanguage.json", "embeddedLanguages": { "meta.embedded.block.gyb": "python", "meta.embedded.control.begin.gyb": "python", "meta.embedded.expression.gyb": "python" } } ], "snippets": [ { "language": "swift", "path": "./snippets/swift.code-snippets" }, { "language": "swift", "path": "./snippets/xctest.code-snippets" }, { "language": "swift", "path": "./snippets/swift-testing.code-snippets" } ], "commands": [ { "command": "swift.showCommands", "title": "Show Commands", "category": "Swift" }, { "command": "swift.configureSettings", "title": "Configure Settings", "category": "Swift" }, { "command": "swift.generateLaunchConfigurations", "title": "Generate Launch Configurations", "category": "Swift" }, { "command": "swift.previewDocumentation", "title": "Preview Documentation", "category": "Swift", "icon": "$(swift-documentation-preview)" }, { "command": "swift.createNewProject", "title": "Create New Project...", "category": "Swift" }, { "command": "swift.openEducationalNote", "title": "Open Educational Note...", "category": "Swift" }, { "command": "swift.newFile", "title": "Create New Swift File...", "shortTitle": "Swift File", "category": "Swift" }, { "command": "swift.updateDependencies", "title": "Update Package Dependencies", "icon": "$(cloud-download)", "category": "Swift" }, { "command": "swift.resolveDependencies", "title": "Resolve Package Dependencies", "icon": "$(refresh)", "category": "Swift" }, { "command": "swift.flatDependenciesList", "title": "Flat Dependencies List View", "icon": "$(list-flat)", "category": "Swift" }, { "command": "swift.nestedDependenciesList", "title": "Nested Dependencies List View", "icon": "$(list-tree)", "category": "Swift" }, { "command": "swift.cleanBuild", "title": "Clean Build Folder", "category": "Swift" }, { "command": "swift.run", "title": "Run Swift executable", "category": "Swift", "icon": "$(play)" }, { "command": "swift.play", "title": "Run Swift playground", "category": "Swift", "icon": "$(play)" }, { "command": "swift.debug", "title": "Debug Swift executable", "category": "Swift", "icon": "$(debug)" }, { "command": "swift.resetPackage", "title": "Reset Package Dependencies", "icon": "$(clear-all)", "category": "Swift" }, { "command": "swift.runScript", "title": "Run Swift Script", "category": "Swift" }, { "command": "swift.useLocalDependency", "title": "Use Local Version", "category": "Swift" }, { "command": "swift.editDependency", "title": "Edit Locally", "category": "Swift" }, { "command": "swift.uneditDependency", "title": "Revert To Original Version", "category": "Swift" }, { "command": "swift.openInWorkspace", "title": "Add to Workspace", "category": "Swift" }, { "command": "swift.openExternal", "title": "View Repository", "category": "Swift" }, { "command": "swift.openPackage", "title": "Open Package.swift", "category": "Swift" }, { "command": "swift.restartLSPServer", "title": "Restart LSP Server", "category": "Swift" }, { "command": "swift.reindexProject", "title": "Re-Index Project", "category": "Swift" }, { "command": "swift.switchPlatform", "title": "Select Target Platform...", "category": "Swift" }, { "command": "swift.selectToolchain", "title": "Select Toolchain...", "category": "Swift" }, { "command": "swift.installSwiftlyToolchain", "title": "Install Swiftly Toolchain...", "category": "Swift" }, { "command": "swift.installSwiftlySnapshotToolchain", "title": "Install Swiftly Snapshot Toolchain...", "category": "Swift" }, { "command": "swift.runSnippet", "title": "Run Swift Snippet", "category": "Swift", "icon": "$(play)" }, { "command": "swift.debugSnippet", "title": "Debug Swift Snippet", "category": "Swift", "icon": "$(debug)" }, { "command": "swift.runPluginTask", "title": "Run Command Plugin", "category": "Swift" }, { "command": "swift.insertFunctionComment", "title": "Insert Function Comment", "category": "Swift" }, { "command": "swift.attachDebugger", "title": "Attach to Process...", "category": "Swift" }, { "command": "swift.captureDiagnostics", "title": "Capture Diagnostic Bundle", "category": "Swift" }, { "command": "swift.clearDiagnosticsCollection", "title": "Clear Diagnostics Collection", "category": "Swift" }, { "command": "swift.runTestsMultipleTimes", "title": "Run Multiple Times...", "category": "Swift" }, { "command": "swift.runTestsUntilFailure", "title": "Run Until Failure...", "category": "Swift" }, { "command": "swift.debugTestsMultipleTimes", "title": "Debug Multiple Times...", "category": "Swift" }, { "command": "swift.debugTestsUntilFailure", "title": "Debug Until Failure...", "category": "Swift" }, { "command": "swift.pickProcess", "title": "Pick Process...", "category": "Swift" }, { "command": "swift.runAllTestsParallel", "title": "Run Tests in Parallel", "category": "Test", "icon": "$(testing-run-all-icon)" }, { "command": "swift.runAllTests", "title": "Run Tests", "category": "Test", "icon": "$(testing-run-icon)" }, { "command": "swift.debugAllTests", "title": "Debug Tests", "category": "Test", "icon": "$(testing-debug-icon)" }, { "command": "swift.coverAllTests", "title": "Run Tests with Coverage", "category": "Test", "icon": "$(debug-coverage)" }, { "command": "swift.runTest", "title": "Run Test", "category": "Test", "icon": "$(testing-run-icon)", "enablement": "false" }, { "command": "swift.debugTest", "title": "Debug Test", "category": "Test", "icon": "$(testing-debug-icon)", "enablement": "false" }, { "command": "swift.runTestWithCoverage", "title": "Run Test with Coverage", "category": "Test", "icon": "$(debug-coverage)", "enablement": "false" }, { "command": "swift.openDocumentation", "title": "Open Documentation", "category": "Swift", "icon": "$(book)" }, { "command": "swift.generateSourcekitConfiguration", "title": "Generate SourceKit-LSP Configuration", "category": "Swift" } ], "configuration": [ { "title": "Swift", "properties": { "swift.path": { "type": "string", "default": "", "markdownDescription": "Override the default path of the folder containing the Swift executables. The default is to look in the `PATH` environment variable.", "scope": "machine-overridable" }, "swift.buildArguments": { "type": "array", "default": [], "items": { "type": "string" }, "markdownDescription": "Additional arguments to pass to `swift build` and `swift test`. Keys and values should be provided as individual entries in the list. If you have created a copy of the build task in `tasks.json` then these build arguments will not be propagated to that task.", "scope": "machine-overridable" }, "swift.scriptSwiftLanguageVersion": { "type": "string", "enum": [ "6", "5", "4.2", "4", "Ask Every Run" ], "enumDescriptions": [ "Use Swift 6 when running Swift scripts.", "Use Swift 5 when running Swift scripts.", "Prompt to select the Swift version each time a script is run." ], "markdownDescription": "The default Swift version to use when running Swift scripts.", "scope": "machine-overridable" }, "swift.packageArguments": { "type": "array", "default": [], "items": { "type": "string" }, "markdownDescription": "Additional arguments to pass to swift commands that do package resolution, such as `swift package resolve`, `swift package update`, `swift build` and `swift test`. Keys and values should be provided as individual entries in the list.", "scope": "machine-overridable" }, "swift.sanitizer": { "type": "string", "default": "off", "enum": [ "off", "thread", "address" ], "markdownDescription": "Runtime [sanitizer instrumentation](https://www.swift.org/documentation/server/guides/llvm-sanitizers.html).", "scope": "machine-overridable" }, "swift.searchSubfoldersForPackages": { "type": "boolean", "default": false, "markdownDescription": "Search sub-folders of workspace folder for Swift Packages at start up.", "scope": "machine-overridable" }, "swift.ignoreSearchingForPackagesInSubfolders": { "type": "array", "items": { "type": "string" }, "default": [ ".", ".build", "Packages", "out", "bazel-out", "bazel-bin" ], "markdownDescription": "A list of folders to ignore when searching sub-folders for Swift Packages. The `swift.searchSubfoldersForPackages` must be `true` for this setting to have an effect. Always use forward-slashes in glob expressions regardless of platform. This is combined with VS Code's `files.exclude` setting.", "scope": "machine-overridable" }, "swift.autoGenerateLaunchConfigurations": { "type": "boolean", "default": true, "markdownDescription": "When loading a `Package.swift`, auto-generate `launch.json` configurations for running any executables.", "scope": "machine-overridable" }, "swift.disableAutoResolve": { "type": "boolean", "default": false, "markdownDescription": "Disable automatic running of `swift package resolve` whenever the `Package.swift` or `Package.resolved` files are updated. This will also disable searching for command plugins and the initial test discovery process.", "scope": "machine-overridable" }, "swift.diagnosticsCollection": { "type": "string", "default": "keepSourceKit", "markdownDescription": "Controls how diagnostics from the various providers are merged into the collection of `swift` errors and warnings shown in the Problems pane.", "enum": [ "onlySwiftc", "onlySourceKit", "keepSwiftc", "keepSourceKit", "keepAll" ], "enumDescriptions": [ "Only provide diagnostics from `swiftc`.", "Only provide diagnostics from `SourceKit`.", "When merging diagnostics, give precedence to diagnostics from `swiftc`.", "When merging diagnostics, give precedence to diagnostics from `SourceKit`.", "Keep diagnostics from all providers." ], "scope": "machine-overridable" }, "swift.diagnosticsStyle": { "type": "string", "default": "default", "markdownDescription": "The formatting style used when printing diagnostics in the Problems panel. Corresponds to the `-diagnostic-style` option to pass to `swiftc` when running `swift` tasks.", "enum": [ "default", "llvm", "swift" ], "markdownEnumDescriptions": [ "Use whichever diagnostics style `swiftc` produces by default.", "Use the `llvm` diagnostic style. This allows the parsing of \"notes\".", "Use the `swift` diagnostic style. This means that \"notes\" will not be parsed. This option has no effect in Swift versions prior to 5.10." ], "scope": "machine-overridable" }, "swift.backgroundCompilation": { "type": [ "boolean", "object" ], "default": false, "markdownDescription": "Run `swift build` in the background whenever a file is saved. Setting to `true` enables, or you can use `object` notation for more fine grained control. It is possible the background compilation will already be running when you attempt a compile yourself, so this is disabled by default.", "properties": { "enabled": { "type": "boolean", "default": true, "description": "Enable/disable background compilation." }, "useDefaultTask": { "type": "boolean", "default": true, "markdownDescription": "Use the default build task configured using the `Tasks: Configure Default Build Task` command when executing the background compilation. `#enabled#` property must be `true`." }, "release": { "type": "boolean", "default": false, "markdownDescription": "Use the `release` variant of the `Build All` task when executing the background compilation. `#enabled#` property must be `true`. This is ignored if the `#useDefaultTask#` property is true." } } }, "swift.actionAfterBuildError": { "type": "string", "default": "Focus Terminal", "enum": [ "Focus Problems", "Focus Terminal", "Do Nothing" ], "enumDescriptions": [ "Focus on Problems View", "Focus on Build Task Terminal" ], "markdownDescription": "Action after a Build task generates errors.", "scope": "application" }, "swift.buildPath": { "type": "string", "default": "", "markdownDescription": "The path to a directory that will be used for build artifacts. This path will be added to all swift package manager commands that are executed by vscode-swift extension via `--scratch-path` option. When no value provided - nothing gets passed to swift package manager and it will use its default value of `.build` folder in the workspace.\n\nYou can use absolute path for directory or the relative path, which will use the workspace path as a base. Note that VS Code does not respect tildes (`~`) in paths which represents user home folder under *nix systems.", "scope": "machine-overridable" }, "swift.disableSwiftPackageManagerIntegration": { "type": "boolean", "default": false, "markdownDescription": "Disables automated Build Tasks, Package Dependency view, Launch configuration generation and TestExplorer.", "scope": "machine-overridable" }, "swift.warnAboutSymlinkCreation": { "type": "boolean", "default": true, "markdownDescription": "Controls whether or not the extension will warn about being unable to create symlinks. (Windows only)", "scope": "application" }, "swift.enableTerminalEnvironment": { "type": "boolean", "default": true, "markdownDescription": "Controls whether or not the extension will contribute environment variables defined in `Swift: Environment Variables` to the integrated terminal. If this is set to `true` and a custom `Swift: Path` is also set then the swift path is appended to the terminal's `PATH`.", "scope": "application" }, "swift.pluginArguments": { "default": [], "markdownDescription": "Configure a list of arguments to pass to command invocations. This can either be an array of arguments, which will apply to all command invocations, or an object with command names as the key where the value is an array of arguments.", "scope": "machine-overridable", "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object", "patternProperties": { "^([a-zA-Z0-9_-]+(:[a-zA-Z0-9_-]+)?)$": { "type": "array", "items": { "type": "string" } } } } ] }, "swift.pluginPermissions": { "type": "object", "default": {}, "markdownDescription": "Configures a list of permissions to be used when running a command plugins.\n\nPermissions objects are defined in the form:\n\n`{ \"PluginName:command\": { \"allowWritingToPackageDirectory\": true } }`.\n\nA key of `PluginName:command` will set permissions for a specific command. A key of `PluginName` will set permissions for all commands in the plugin.", "scope": "machine-overridable", "patternProperties": { "^([a-zA-Z0-9_-]+(:[a-zA-Z0-9_-]+)?)$": { "type": "object", "properties": { "disableSandbox": { "type": "boolean", "description": "Disable using the sandbox when executing plugins" }, "allowWritingToPackageDirectory": { "type": "boolean", "description": "Allow the plugin to write to the package directory" }, "allowWritingToDirectory": { "oneOf": [ { "type": "string", "description": "Allow the plugin to write to an additional directory" }, { "type": "array", "items": { "type": "string" }, "description": "Allow the plugin to write to additional directories" } ] }, "allowNetworkConnections": { "type": "string", "description": "Allow the plugin to make network connections" } } } } }, "swift.attachmentsPath": { "type": "string", "default": ".build/attachments", "markdownDescription": "The path to a directory that will be used to store attachments produced during a test run.\n\nA relative path resolves relative to the root directory of the workspace running the test(s)", "scope": "machine-overridable" }, "swift.outputChannelLogLevel": { "type": "string", "default": "info", "markdownDescription": "The log level of the Swift output channel. This has no effect on the verbosity of messages written to the extension's log file.", "enum": [ "debug", "info", "warn", "error" ], "scope": "machine-overridable" } } }, { "title": "Testing", "properties": { "swift.additionalTestArguments": { "type": "array", "default": [], "items": { "type": "string" }, "markdownDescription": "Additional arguments to pass to the `swift test` or `swift build` commands used when building and running tests from within VS Code.", "scope": "machine-overridable" }, "swift.testEnvironmentVariables": { "type": "object", "patternProperties": { ".*": { "type": "string" } }, "default": {}, "markdownDescription": "Environment variables to set when running tests. To set environment variables when debugging an application you should edit the `env` field in the relevant `launch.json` configuration.", "scope": "machine-overridable" }, "swift.excludeFromCodeCoverage": { "description": "A list of paths to exclude from code coverage reports. Paths can be absolute or relative to the workspace root.", "type": "array", "items": { "type": "string" }, "default": [], "scope": "machine-overridable" }, "swift.showTestCodeLenses": { "type": [ "boolean", "array" ], "default": true, "markdownDescription": "Controls whether or not to show inline code lenses for running and debugging tests inline, above test and suite declarations. If set to an array, specify one or more of the following: 'run', 'debug', 'coverage'.", "scope": "application", "items": { "type": "string", "enum": [ "run", "debug", "coverage" ] } }, "swift.recordTestDuration": { "type": "boolean", "default": true, "markdownDescription": "Controls whether or not to record the duration of tests in the Test Explorer. This is used to show the duration of tests in the Test Explorer view. If you're experiencing performance issues when running a large number of tests that complete quickly, disabling this setting can make the UI more responsive.", "scope": "machine-overridable" } } }, { "title": "User Interface", "properties": { "swift.excludePathsFromPackageDependencies": { "markdownDescription": "A list of glob patterns to exclude from the Package Dependencies view. Always use forward-slashes in glob expressions regardless of platform. This is combined with VS Code's default `files.exclude` setting.", "type": "array", "items": { "type": "string" }, "default": [ "**/.git", "**/.github" ], "scope": "machine-overridable" }, "swift.showBuildStatus": { "type": "string", "default": "swiftStatus", "markdownDescription": "Controls where to show the Swift build progress when running a `swift` build task.", "enum": [ "never", "swiftStatus", "progress", "notification" ], "enumDescriptions": [ "Never show the Swift build status.", "Show the Swift build status in a status bar item provided by the Swift extension.", "Show the Swift build status in the \"Progress Message\" status bar item provided by VS Code.", "Show the Swift build status as a progress notification." ], "scope": "application" }, "swift.createTasksForLibraryProducts": { "type": "boolean", "default": false, "markdownDescription": "When enabled, the extension will create \"swift\" build tasks for library products in the package manifest. Note that automatic library products will not be included.", "scope": "machine-overridable" }, "swift.showCreateSwiftProjectInWelcomePage": { "type": "boolean", "default": true, "markdownDescription": "Controls whether or not the create new swift project button appears in the welcome page.", "scope": "application" }, "swift.openAfterCreateNewProject": { "type": "string", "enum": [ "always", "alwaysNewWindow", "whenNoFolderOpen", "prompt" ], "enumDescriptions": [ "Always open in current window.", "Always open in a new window.", "Only open in current window when no folder is opened.", "Always prompt for action." ], "default": "prompt", "markdownDescription": "Controls whether to open a swift project automatically after creating it.", "scope": "application" }, "swift.lspConfigurationBranch": { "type": "string", "markdownDescription": "Set the branch to use when setting the `$schema` property of the SourceKit-LSP configuration. For example: \"release/6.1\" or \"main\". When this setting is unset, the extension will determine the branch based on the version of the toolchain that is in use." }, "swift.checkLspConfigurationSchema": { "type": "boolean", "default": true, "markdownDescription": "When opening a .sourckit-lsp/config.json configuration file, whether or not to check if the $schema matches the version of Swift you are using.", "scope": "machine-overridable" } } }, { "title": "SourceKit-LSP", "properties": { "swift.sourcekit-lsp.serverPath": { "type": "string", "markdownDescription": "The path of the `sourcekit-lsp` executable. The default is to look in the path where `swift` is found.", "deprecationMessage": "Deprecated: The sourcekit-lsp executable relies on outputs from tools in your current toolchain. If your sourcekit-lsp version does not match your toolchain you may experience unexpected behaviour. Only modify this setting when developing sourcekit-lsp.", "markdownDeprecationMessage": "**Deprecated**: The sourcekit-lsp executable relies on outputs from tools in your current toolchain. If your sourcekit-lsp version does not match your toolchain you may experience unexpected behaviour. Only modify this setting when developing sourcekit-lsp.", "order": 1 }, "swift.sourcekit-lsp.serverArguments": { "type": "array", "default": [], "items": { "type": "string" }, "markdownDescription": "Arguments to pass to SourceKit-LSP. Keys and values should be provided as individual entries in the list. e.g. `--experimental-feature=show-macro-expansions`", "order": 2 }, "swift.sourcekit-lsp.supported-languages": { "type": "array", "default": [ "swift", "objective-c", "objective-cpp", "c", "cpp" ], "markdownDescription": "List of languages supported by SourceKit-LSP. This is used to determine whether SourceKit-LSP should provide language features for a particular file type. If you want a different extension to provide support for a language, remove it from the list.", "items": { "type": "string", "enum": [ "swift", "objective-c", "objective-cpp", "c", "cpp" ] }, "order": 3, "scope": "machine-overridable" }, "swift.sourcekit-lsp.backgroundIndexing": { "type": "string", "enum": [ "on", "off", "auto" ], "default": "auto", "markdownDescription": "Turns background indexing `on` or `off`. `auto` will enable background indexing if the Swift version is >= 6.1. This option has no effect in Swift versions prior to 6.0.", "order": 4, "scope": "machine-overridable" }, "swift.sourcekit-lsp.trace.server": { "type": "string", "default": "off", "enum": [ "off", "messages", "verbose" ], "markdownDescription": "Controls logging the communication between VS Code and the SourceKit-LSP language server. Logs can be viewed in Output > SourceKit Language Server.", "order": 5, "scope": "machine-overridable" }, "swift.sourcekit-lsp.disable": { "type": "boolean", "default": false, "markdownDescription": "Disable SourceKit-LSP. This will turn off features like code completion, error diagnostics and jump-to-definition. Features like swift-testing test discovery will not work correctly.", "order": 6, "scope": "machine-overridable" }, "swift.sourcekit-lsp.includeDeclarationInFindAllReferences": { "type": "string", "default": "default", "enum": [ "default", "always", "never" ], "enumDescriptions": [ "Use the value sent by VS Code.", "Always include the symbol declaration in `Find All References` results.", "Never include the symbol declaration in `Find All References` results." ], "markdownDescription": "Controls whether the symbol declaration is included in the results of `Find All References`.", "order": 7, "scope": "machine-overridable" }, "sourcekit-lsp.inlayHints.enabled": { "type": "boolean", "default": true, "markdownDescription": "Display Inlay Hints. Inlay Hints are variable annotations indicating their inferred type. They are only available if you are using Swift 5.6 or later.", "deprecationMessage": "Deprecated: Please use \"editor.inlayHints.enabled\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#editor.inlayHints.enabled#` instead." }, "sourcekit-lsp.support-c-cpp": { "type": "string", "default": "cpptools-inactive", "enum": [ "enable", "disable", "cpptools-inactive" ], "enumDescriptions": [ "Always enable", "Always disable", "Disable when C/C++ extension is active" ], "markdownDescription": "Add LSP functionality for C/C++ files. By default this is set to disable when the C/C++ extension is active.", "deprecationMessage": "Deprecated: Please use \"swift.sourcekit-lsp.supported-languages\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.sourcekit-lsp.supported-languages#` instead." }, "sourcekit-lsp.serverPath": { "type": "string", "markdownDescription": "The path of the `sourcekit-lsp` executable. The default is to look in the path where `swift` is found.", "deprecationMessage": "Deprecated: Please use \"swift.sourcekit-lsp.serverPath\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.sourcekit-lsp.serverPath#` instead." }, "sourcekit-lsp.serverArguments": { "type": "array", "default": [], "items": { "type": "string" }, "markdownDescription": "Arguments to pass to SourceKit-LSP. Keys and values should be provided as individual entries in the list. e.g. `--experimental-feature=show-macro-expansions`", "deprecationMessage": "Deprecated: Please use \"swift.sourcekit-lsp.serverArguments\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.sourcekit-lsp.serverArguments#` instead." }, "sourcekit-lsp.trace.server": { "type": "string", "default": "off", "enum": [ "off", "messages", "verbose" ], "markdownDescription": "Traces the communication between VS Code and the SourceKit-LSP language server.", "deprecationMessage": "Deprecated: Please use \"swift.sourcekit-lsp.trace.server\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.sourcekit-lsp.trace.server#` instead." }, "sourcekit-lsp.disable": { "type": "boolean", "default": false, "markdownDescription": "Disable the running of SourceKit-LSP.", "deprecationMessage": "Deprecated: Please use \"swift.sourcekit-lsp.disable\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.sourcekit-lsp.disable#` instead." }, "swift.excludePathsFromActivation": { "type": "object", "additionalProperties": { "type": "boolean" }, "markdownDescription": "Configure glob patterns for excluding Swift package folders from getting activated. This will take precedence over the glob patterns provided to `files.exclude`." } } }, { "title": "Debugger", "properties": { "swift.debugger.debugAdapter": { "type": "string", "default": "auto", "enum": [ "auto", "lldb-dap", "CodeLLDB" ], "enumDescriptions": [ "Automatically select which debug adapter to use based on your Swift toolchain version.", "Use the `lldb-dap` executable from the toolchain. Requires Swift 6 or later.", "Use the CodeLLDB extension's debug adapter." ], "markdownDescription": "Select which debug adapter to use to debug Swift executables.", "order": 1, "scope": "machine-overridable" }, "swift.debugger.path": { "type": "string", "default": "", "markdownDescription": "Path to lldb debug adapter.", "order": 2, "scope": "machine-overridable" }, "swift.debugger.setupCodeLLDB": { "type": "string", "default": "prompt", "enum": [ "prompt", "alwaysUpdateGlobal", "alwaysUpdateWorkspace", "never" ], "enumDescriptions": [ "Prompt to update CodeLLDB settings when they are incorrect.", "Always automatically update CodeLLDB settings globally when they are incorrect.", "Always automatically update CodeLLDB settings in the workspace when they are incorrect.", "Never automatically update CodeLLDB settings when they are incorrect." ], "markdownDescription": "Choose how CodeLLDB settings are updated when debugging Swift executables.", "order": 3, "scope": "machine-overridable" }, "swift.debugger.useDebugAdapterFromToolchain": { "type": "boolean", "default": false, "deprecationMessage": "Deprecated: Please use \"swift.debugger.debugAdapter\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.debugger.debugAdapter#` instead.", "markdownDescription": "Use the LLDB debug adapter packaged with the Swift toolchain as your debug adapter. Note: this is only available starting with Swift 6. The CodeLLDB extension will be used if your Swift toolchain does not contain lldb-dap.", "order": 4 } } }, { "title": "Advanced", "properties": { "swift.swiftEnvironmentVariables": { "type": "object", "patternProperties": { ".*": { "type": "string" } }, "default": {}, "markdownDescription": "Additional environment variables to pass to swift operations (`swift build`, `swift resolve`, etc...).", "order": 1, "scope": "machine-overridable" }, "swift.runtimePath": { "type": "string", "default": "", "markdownDescription": "The path of the folder containing the Swift runtime libraries. This is of use when supporting non-standard SDK layouts on Windows. On Windows the runtime path is added to the `Path` environment variable. This is of less use on macOS and Linux but will be added to `DYLD_LIBRARY_PATH` and `LD_LIBRARY_PATH` environment variables respectively on each platform. ", "order": 2, "scope": "machine-overridable" }, "swift.SDK": { "type": "string", "default": "", "markdownDescription": "The path of the SDK to compile against (`--sdk` parameter). This is of use when supporting non-standard SDK layouts on Windows and using custom SDKs. The default SDK is determined by the environment on macOS and Windows.\n\nFor SwiftPM projects, prefer using `swift.swiftSDK` with a triple (such as `arm64-apple-ios`) or Swift SDK name instead.", "order": 3, "scope": "machine-overridable" }, "swift.swiftSDK": { "type": "string", "default": "", "markdownDescription": "The [Swift SDK](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md) to compile against (`--swift-sdk` parameter).", "scope": "machine-overridable" }, "swift.disableSandbox": { "type": "boolean", "default": false, "markdownDescription": "Disable sandboxing when running SwiftPM commands. In most cases you should keep the sandbox enabled and leave this setting set to `false`", "order": 4, "scope": "machine-overridable" }, "swift.disableSandox": { "type": "boolean", "default": false, "order": 4, "scope": "machine-overridable", "markdownDescription": "Disable sandboxing when running SwiftPM commands. In most cases you should keep the sandbox enabled and leave this setting set to `false`", "deprecationMessage": "Deprecated: Please use \"swift.disableSandbox\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.disableSandbox#` instead." }, "swift.disableSwiftlyInstallPrompt": { "type": "boolean", "default": false, "markdownDescription": "Disable the automatic Swiftly installation prompt when no Swift toolchain is found.", "order": 98, "scope": "machine-overridable" }, "swift.ignoreSwiftVersionFile": { "type": "boolean", "default": false, "markdownDescription": "Ignore `.swift-version` files and disable automatic toolchain switching based on them. When enabled, the extension will always use the global default toolchain instead of switching based on per-project `.swift-version` files.", "order": 99, "scope": "machine-overridable" }, "swift.diagnostics": { "type": "boolean", "default": false, "markdownDescription": "Output additional diagnostics to the Swift output channel.", "deprecationMessage": "Deprecated: Please use \"swift.outputChannelLogLevel\" instead.", "markdownDeprecationMessage": "**Deprecated**: Please use `#swift.outputChannelLogLevel#` instead.", "order": 100, "scope": "machine-overridable" } } } ], "keybindings": [ { "command": "swift.newFile", "key": "Alt+S Alt+N" }, { "command": "swift.insertFunctionComment", "key": "Alt+Ctrl+/", "mac": "Alt+Cmd+/", "when": "editorTextFocus" } ], "menus": { "testing/item/gutter": [ { "command": "swift.runTestsMultipleTimes", "group": "testExtras", "when": "testId in swift.tests" }, { "command": "swift.runTestsUntilFailure", "group": "testExtras", "when": "testId in swift.tests" }, { "command": "swift.debugTestsMultipleTimes", "group": "testExtras", "when": "testId in swift.tests" }, { "command": "swift.debugTestsUntilFailure", "group": "testExtras", "when": "testId in swift.tests" } ], "testing/item/context": [ { "command": "swift.runTestsMultipleTimes", "group": "testExtras", "when": "testId in swift.tests" }, { "command": "swift.runTestsUntilFailure", "group": "testExtras", "when": "testId in swift.tests" }, { "command": "swift.debugTestsMultipleTimes", "group": "testExtras", "when": "testId in swift.tests" }, { "command": "swift.debugTestsUntilFailure", "group": "testExtras", "when": "testId in swift.tests" } ], "file/newFile": [ { "command": "swift.newFile", "group": "file", "when": "swift.isActivated" } ], "explorer/context": [ { "command": "swift.newFile", "group": "swift", "when": "swift.isActivated" } ], "commandPalette": [ { "command": "swift.runTestsMultipleTimes", "group": "testExtras", "when": "false" }, { "command": "swift.runTestsUntilFailure", "group": "testExtras", "when": "false" }, { "command": "swift.debugTestsMultipleTimes", "group": "testExtras", "when": "false" }, { "command": "swift.debugTestsUntilFailure", "group": "testExtras", "when": "false" }, { "command": "swift.generateLaunchConfigurations", "when": "swift.hasExecutableProduct" }, { "command": "swift.previewDocumentation", "when": "swift.supportsDocumentationLivePreview" }, { "command": "swift.installSwiftlyToolchain", "when": "swift.supportsSwiftlyInstall" }, { "command": "swift.installSwiftlySnapshotToolchain", "when": "swift.supportsSwiftlyInstall" }, { "command": "swift.createNewProject", "when": "!swift.isActivated || swift.createNewProjectAvailable" }, { "command": "swift.updateDependencies", "when": "swift.hasPackage" }, { "command": "swift.resolveDependencies", "when": "swift.hasPackage" }, { "command": "swift.cleanBuild", "when": "swift.hasPackage" }, { "command": "swift.switchPlatform", "when": "swift.switchPlatformAvailable" }, { "command": "swift.insertFunctionComment", "when": "swift.isActivated" }, { "command": "swift.resetPackage", "when": "swift.hasPackage" }, { "command": "swift.restartLSPServer", "when": "swift.isActivated" }, { "command": "swift.openPackage", "when": "swift.hasPackage" }, { "command": "swift.flatDependenciesList", "when": "false" }, { "command": "swift.nestedDependenciesList", "when": "false" }, { "command": "swift.useLocalDependency", "when": "false" }, { "command": "swift.editDependency", "when": "false" }, { "command": "swift.openInWorkspace", "when": "false" }, { "command": "swift.uneditDependency", "when": "false" }, { "command": "swift.openExternal", "when": "false" }, { "command": "swift.run", "when": "editorLangId == swift && swift.currentTargetType == 'executable'" }, { "command": "swift.debug", "when": "editorLangId == swift && swift.currentTargetType == 'executable'" }, { "command": "swift.runScript", "when": "!swift.fileIsSnippet && editorLangId == swift && swift.currentTargetType == 'none'" }, { "command": "swift.runSnippet", "when": "swift.fileIsSnippet" }, { "command": "swift.debugSnippet", "when": "swift.fileIsSnippet" }, { "command": "swift.runPluginTask", "when": "swift.packageHasPlugins" }, { "command": "swift.attachDebugger", "when": "swift.lldbVSCodeAvailable" }, { "command": "swift.reindexProject", "when": "swift.supportsReindexing" }, { "command": "swift.pickProcess", "when": "false" }, { "command": "swift.runAllTestsParallel", "when": "swift.isActivated" }, { "command": "swift.runAllTests", "when": "swift.isActivated" }, { "command": "swift.debugAllTests", "when": "swift.isActivated" }, { "command": "swift.coverAllTests", "when": "swift.isActivated" }, { "command": "swift.runTest", "when": "false" }, { "command": "swift.debugTest", "when": "false" }, { "command": "swift.runTestWithCoverage", "when": "false" }, { "command": "swift.openEducationalNote", "when": "false" }, { "command": "swift.play", "when": "false" } ], "editor/context": [ { "submenu": "swift.editor" } ], "editor/title": [ { "command": "swift.previewDocumentation", "when": "swift.supportsDocumentationLivePreview && (editorLangId == markdown || editorLangId == tutorial || editorLangId == swift)", "group": "navigation" } ], "editor/title/run": [ { "command": "swift.run", "group": "navigation@0", "when": "resourceLangId == swift && swift.currentTargetType == 'executable'" }, { "command": "swift.debug", "group": "navigation@0", "when": "resourceLangId == swift && swift.currentTargetType == 'executable'" } ], "swift.editor": [ { "command": "swift.run", "group": "1_file@1", "when": "editorLangId == swift && swift.currentTargetType == 'executable'" }, { "command": "swift.debug", "group": "1_file@2", "when": "editorLangId == swift && swift.currentTargetType == 'executable'" }, { "command": "swift.runScript", "group": "1_file@3", "when": "!swift.fileIsSnippet && editorLangId == swift && swift.currentTargetType == 'none'" }, { "command": "swift.runSnippet", "group": "1_file@4", "when": "swift.fileIsSnippet" }, { "command": "swift.debugSnippet", "group": "1_file@5", "when": "swift.fileIsSnippet" } ], "view/title": [ { "command": "swift.updateDependencies", "when": "view == projectPanel", "group": "navigation@1" }, { "command": "swift.resolveDependencies", "when": "view == projectPanel", "group": "navigation@2" }, { "command": "swift.resetPackage", "when": "view == projectPanel", "group": "navigation@3" }, { "command": "swift.flatDependenciesList", "when": "view == projectPanel && !swift.flatDependenciesList", "group": "navigation@4" }, { "command": "swift.nestedDependenciesList", "when": "view == projectPanel && swift.flatDependenciesList", "group": "navigation@5" }, { "command": "swift.openDocumentation", "when": "view == projectPanel", "group": "navigation@6" } ], "view/item/context": [ { "command": "swift.useLocalDependency", "when": "view == projectPanel && viewItem == remote" }, { "command": "swift.uneditDependency", "when": "view == projectPanel && viewItem == editing" }, { "command": "swift.openInWorkspace", "when": "view == projectPanel && viewItem == editing" }, { "command": "swift.openInWorkspace", "when": "view == projectPanel && viewItem == local" }, { "command": "swift.openExternal", "when": "view == projectPanel && (viewItem == 'editing' || viewItem == 'remote')" }, { "command": "swift.run", "when": "view == projectPanel && viewItem == 'runnable'", "group": "inline@0" }, { "command": "swift.debug", "when": "view == projectPanel && viewItem == 'runnable'", "group": "inline@1" }, { "command": "swift.runSnippet", "when": "view == projectPanel && viewItem == 'snippet_runnable'", "group": "inline@0" }, { "command": "swift.debugSnippet", "when": "view == projectPanel && viewItem == 'snippet_runnable'", "group": "inline@1" }, { "command": "swift.runAllTests", "when": "view == projectPanel && viewItem == 'test_runnable'", "group": "inline@0" }, { "command": "swift.debugAllTests", "when": "view == projectPanel && viewItem == 'test_runnable'", "group": "inline@1" }, { "command": "swift.runAllTestsParallel", "when": "view == projectPanel && viewItem == 'test_runnable'", "group": "inline@2" }, { "command": "swift.coverAllTests", "when": "view == projectPanel && viewItem == 'test_runnable'", "group": "inline@3" }, { "command": "swift.play", "when": "view == projectPanel && viewItem == 'playground'", "group": "inline@1" } ] }, "submenus": [ { "id": "swift.editor", "label": "Swift" } ], "problemMatchers": [ { "name": "swiftc", "owner": "swift", "source": "swiftc", "fileLocation": "absolute", "pattern": [ { "regexp": "^(.*?):(\\d+)(?::(\\d+))?:\\s+(warning|error|note):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } ] } ], "taskDefinitions": [ { "type": "swift", "properties": { "args": { "description": "An array of arguments for the command. Each argument will be quoted separately.", "type": "array", "items": { "type": "string" } }, "env": { "type": "object", "patternProperties": { ".*": { "type": "string" } }, "description": "Additional environment variables to set when running the task.", "default": {} }, "cwd": { "description": "The folder to run the task in.", "type": "string" }, "disableTaskQueue": { "description": "Disable any queued tasks while running the task. This includes the auto resolve when Packages.resolved is updated.", "type": "boolean" }, "dontTriggerTestDiscovery": { "description": "Don't trigger the test discovery process.", "type": "boolean" }, "showBuildStatus": { "description": "Where to show the Swift build progress when running a `swift` build task. Default comes from the `swift.showBuildStatus` setting.", "type": "string", "enum": [ "never", "swiftStatus", "progress", "notification" ] }, "macos": { "type": "object", "description": "macOS specific task configuration", "properties": { "args": { "description": "An array of arguments for the command. Each argument will be quoted separately.", "type": "array", "items": { "type": "string" } }, "env": { "type": "object", "patternProperties": { ".*": { "type": "string" } }, "description": "Additional environment variables to set when running the task.", "default": {} }, "cwd": { "description": "The folder to run the task in.", "type": "string" } } }, "linux": { "type": "object", "description": "Linux specific task configuration", "properties": { "args": { "description": "An array of arguments for the command. Each argument will be quoted separately.", "type": "array", "items": { "type": "string" } }, "env": { "type": "object", "patternProperties": { ".*": { "type": "string" } }, "description": "Additional environment variables to set when running the task.", "default": {} }, "cwd": { "description": "The folder to run the task in.", "type": "string" } } }, "windows": { "type": "object", "description": "Windows specific task configuration", "properties": { "args": { "description": "An array of arguments for the command. Each argument will be quoted separately.", "type": "array", "items": { "type": "string" } }, "env": { "type": "object", "patternProperties": { ".*": { "type": "string" } }, "description": "Additional environment variables to set when running the task.", "default": {} }, "cwd": { "description": "The folder to run the task in.", "type": "string" } } } }, "required": [ "args" ] }, { "type": "swift-plugin", "properties": { "command": { "description": "The plugin command to execute. This should not contain any arguments as it will be quoted.", "type": "string" }, "args": { "description": "An array of arguments for the command. Each argument will be quoted separately.", "type": "array", "items": { "type": "string" } }, "disableSandbox": { "description": "Plugins normally run inside a sandbox. Set this to true to disable the sandbox when running .", "type": "boolean" }, "allowWritingToPackageDirectory": { "description": "Allow this plugin to write to the package directory.", "type": "boolean" }, "cwd": { "description": "The folder to run the swift plugin in.", "type": "string" }, "disableTaskQueue": { "description": "Disable any queued tasks while running this command plugin. This includes the auto resolve when Packages.resolved is updated.", "type": "boolean" } }, "required": [ "command", "args" ] } ], "views": { "explorer": [ { "id": "projectPanel", "name": "Swift Project", "icon": "$(archive)", "when": "swift.hasPackage" } ] }, "viewsWelcome": [ { "view": "explorer", "contents": "You can also create a new Swift project.\n[Create Swift Project](command:swift.createNewProject)", "when": "workspaceFolderCount == 0 && config.swift.showCreateSwiftProjectInWelcomePage" } ], "breakpoints": [ { "language": "asm" }, { "language": "c" }, { "language": "cpp" }, { "language": "objective-c" }, { "language": "objective-cpp" }, { "language": "rust" }, { "language": "swift" } ], "debuggers": [ { "type": "swift", "label": "Swift Debugger", "variables": { "pickProcess": "swift.pickProcess" }, "configurationAttributes": { "launch": { "properties": { "program": { "type": "string", "description": "Path to the program to debug." }, "target": { "type": "string", "description": "The name of the SwiftPM target to debug." }, "configuration": { "type": "string", "enum": [ "debug", "release" ], "description": "The configuration of the SwiftPM target to use." }, "args": { "type": [ "array", "string" ], "description": "Arguments to provide to the program.", "default": [] }, "cwd": { "type": "string", "description": "The working directory that the program will be launched within.", "default": "${workspaceRoot}" }, "env": { "type": "object", "patternProperties": { ".*": { "type": "string" } }, "description": "Additional environment variables to set when launching the program.", "default": {} }, "stopOnEntry": { "type": "boolean", "description": "Automatically stop after launch.", "default": false }, "disableASLR": { "type": "boolean", "description": "Enable or disable Address space layout randomization if the debugger supports it.", "default": true }, "disableSTDIO": { "type": "boolean", "description": "Don't retrieve STDIN, STDOUT and STDERR as the program is running.", "default": false }, "testType": { "type": "string", "description": "If the program is a test, set this to the type of test (`XCTest` or `swift-testing`). This is typically set automatically and is only required when your launch program uses a non standard filename." }, "shellExpandArguments": { "type": "boolean", "description": "Expand program arguments as a shell would without actually launching the program in a shell.", "default": false }, "detachOnError": { "type": "boolean", "description": "Detach from the program.", "default": false }, "sourcePath": { "type": "string", "description": "Specify a source path to remap \"./\" to allow full paths to be used when setting breakpoints in binaries that have relative source paths." }, "sourceMap": { "type": "array", "description": "Specify an array of path remappings; each element must itself be a two element array containing a source and destination pathname. Overrides sourcePath.", "default": [] }, "debuggerRoot": { "type": "string", "description": "Specify a working directory to set the debug adaptor to so relative object files can be located." }, "targetTriple": { "type": "string", "description": "Triplet of the target architecture to override value derived from the program file." }, "platformName": { "type": "string", "description": "Name of the execution platform to override value derived from the program file." }, "initCommands": { "type": "array", "description": "Initialization commands executed upon debugger startup.", "default": [] }, "preRunCommands": { "type": "array", "description": "Commands executed just before the program is launched.", "default": [] }, "postRunCommands": { "type": "array", "description": "Commands executed just as soon as the program is successfully launched when it's in a stopped state prior to any automatic continuation.", "default": [] }, "launchCommands": { "type": "array", "description": "Custom commands that are executed instead of launching a process. A target will be created with the launch arguments prior to executing these commands. The commands may optionally create a new target and must perform a launch. A valid process must exist after these commands complete or the \"launch\" will fail. Launch the process with \"process launch -s\" to make the process to at the entry point since lldb-dap will auto resume if necessary.", "default": [] }, "stopCommands": { "type": "array", "description": "Commands executed each time the program stops.", "default": [] }, "exitCommands": { "type": "array", "description": "Commands executed when the program exits.", "default": [] }, "terminateCommands": { "type": "array", "description": "Commands executed when the debugging session ends.", "default": [] }, "runInTerminal": { "type": "boolean", "description": "Launch the program inside an integrated terminal in the IDE. Useful for debugging interactive command line programs", "default": false }, "timeout": { "type": "string", "description": "The time in seconds to wait for a program to stop at entry point when launching with \"launchCommands\". Defaults to 30 seconds." } } }, "attach": { "properties": { "program": { "type": "string", "description": "Path to the program to attach to." }, "pid": { "type": [ "string", "number" ], "description": "System process ID to attach to." }, "waitFor": { "type": "boolean", "description": "If set to true, then wait for the process to launch by looking for a process with a basename that matches `program`. No process ID needs to be specified when using this flag.", "default": true }, "sourcePath": { "type": "string", "description": "Specify a source path to remap \"./\" to allow full paths to be used when setting breakpoints in binaries that have relative source paths." }, "sourceMap": { "type": "array", "description": "Specify an array of path remappings; each element must itself be a two element array containing a source and destination pathname. Overrides sourcePath.", "default": [] }, "debuggerRoot": { "type": "string", "description": "Specify a working directory to set the debug adaptor to so relative object files can be located." }, "targetTriple": { "type": "string", "description": "Triplet of the target architecture to override value derived from the program file." }, "platformName": { "type": "string", "description": "Name of the execution platform to override value derived from the program file." }, "attachCommands": { "type": "array", "description": "Custom commands that are executed instead of attaching to a process ID or to a process by name. These commands may optionally create a new target and must perform an attach. A valid process must exist after these commands complete or the \"attach\" will fail.", "default": [] }, "initCommands": { "type": "array", "description": "Initialization commands executed upon debugger startup.", "default": [] }, "preRunCommands": { "type": "array", "description": "Commands executed just before the program is attached to.", "default": [] }, "postRunCommands": { "type": "array", "description": "Commands executed just as soon as the program is successfully attached when it's in a stopped state prior to any automatic continuation.", "default": [] }, "stopCommands": { "type": "array", "description": "Commands executed each time the program stops.", "default": [] }, "exitCommands": { "type": "array", "description": "Commands executed at the end of debugging session.", "default": [] }, "coreFile": { "type": "string", "description": "Path to the core file to debug." }, "timeout": { "type": "string", "description": "The time in seconds to wait for a program to stop when attaching using \"attachCommands\". Defaults to 30 seconds." } } } }, "configurationSnippets": [ { "label": "Swift: Launch", "description": "", "body": { "type": "swift", "request": "launch", "name": "${2:Launch Swift Executable}", "program": "^\"\\${workspaceRoot}/.build/debug/${1:}\"", "args": [], "env": {}, "cwd": "^\"\\${workspaceRoot}\"" } }, { "label": "Swift: Attach to Process", "description": "", "body": { "type": "swift", "request": "attach", "name": "${1:Attach to Swift Executable}", "pid": "^\"\\${command:pickProcess}\"" } }, { "label": "Swift: Attach", "description": "", "body": { "type": "swift", "request": "attach", "name": "${2:Attach to Swift Executable}", "program": "^\"\\${workspaceRoot}/.build/debug/${1:}\"" } } ] } ], "jsonValidation": [ { "fileMatch": "**/.sourcekit-lsp/config.json", "url": "https://raw.githubusercontent.com/swiftlang/sourcekit-lsp/refs/heads/main/config.schema.json" } ] }, "extensionDependencies": [ "llvm-vs-code-extensions.lldb-dap" ], "scripts": { "vscode:prepublish": "npm run bundle", "bundle": "del-cli ./dist && npm run bundle-extension && npm run bundle-documentation-webview", "bundle-extension": "del-cli ./dist && esbuild ./src/extension.ts ./src/askpass/askpass-main.ts --bundle --outdir=dist/src/ --external:vscode --define:process.env.NODE_ENV=\\\"production\\\" --define:process.env.CI=\\\"\\\" --format=cjs --platform=node --target=node18 --minify --sourcemap", "bundle-documentation-webview": "npm run compile-documentation-webview -- --minify", "compile": "del-cli ./dist/ && tsc --build", "watch": "npm run compile -- --watch", "compile-documentation-webview": "del-cli ./assets/documentation-webview && esbuild ./src/documentation/webview/webview.ts --bundle --outfile=assets/documentation-webview/index.js --define:process.env.NODE_ENV=\\\"production\\\" --define:process.env.CI=\\\"\\\" --format=cjs --sourcemap", "watch-documentation-webview": "npm run compile-documentation-webview -- --watch", "lint": "eslint ./ --ext ts && tsc --noEmit && tsc --noEmit -p scripts/tsconfig.json && knip", "build-swift-docc-render": "tsx ./scripts/build_swift_docc_render.ts", "compile-icons": "tsx ./scripts/compile_icons.ts", "format": "prettier --check .", "postinstall": "npm run compile-icons && npm run build-swift-docc-render", "pretest": "npm run compile-tests", "soundness": "scripts/soundness.sh", "check-package-json": "tsx ./scripts/check_package_json.ts", "test": "vscode-test && npm run grammar-test", "grammar-test": "vscode-tmgrammar-test test/unit-tests/**/*.test.swift.gyb -g test/unit-tests/syntaxes/swift.tmLanguage.json -g test/unit-tests/syntaxes/MagicPython.tmLanguage.json", "integration-test": "npm run pretest && vscode-test --label integrationTests", "code-workspace-test": "npm run pretest && vscode-test --label codeWorkspaceTests", "unit-test": "npm run pretest && vscode-test --label unitTests", "coverage": "npm run pretest && vscode-test --coverage", "compile-tests": "del-cli ./assets/test/**/.build && del-cli ./assets/test/**/.spm-cache && npm run compile && npm run compile-documentation-webview", "package": "tsx ./scripts/package.ts", "dev-package": "tsx ./scripts/dev_package.ts", "preview-package": "tsx ./scripts/preview_package.ts", "patch-package": "tsx ./scripts/patch_package.ts", "tag": "./scripts/tag_release.sh $npm_package_version", "contributors": "./scripts/generate_contributors_list.sh", "prepare": "husky" }, "lint-staged": { "**/*.ts": [ "eslint --max-warnings=0", "prettier --write" ], "**/*": "prettier --write --ignore-unknown" }, "devDependencies": { "@eslint/js": "^10.0.1", "@trivago/prettier-plugin-sort-imports": "^6.0.2", "@twbs/fantasticon": "^3.1.0", "@types/archiver": "^7.0.0", "@types/chai": "^4.3.19", "@types/chai-as-promised": "^7.1.8", "@types/chai-subset": "^1.3.6", "@types/decompress": "^4.2.7", "@types/lcov-parse": "^1.0.2", "@types/lodash.debounce": "^4.0.9", "@types/lodash.throttle": "^4.1.9", "@types/micromatch": "^4.0.10", "@types/mocha": "^10.0.10", "@types/mock-fs": "^4.13.4", "@types/node": "^22.19.17", "@types/plist": "^3.0.5", "@types/semver": "^7.7.1", "@types/sinon": "^21.0.1", "@types/sinon-chai": "^3.2.12", "@types/source-map-support": "^0.5.10", "@types/svg2ttf": "^5.0.3", "@types/svgicons2svgfont": "^10.0.5", "@types/ttf2woff": "^2.0.4", "@types/vscode": "^1.88.0", "@types/xml2js": "^0.4.14", "@typescript-eslint/eslint-plugin": "^8.59.2", "@typescript-eslint/parser": "^8.58.1", "@vscode/debugprotocol": "^1.68.0", "@vscode/test-cli": "^0.0.12", "@vscode/test-electron": "^2.5.2", "@vscode/vsce": "^3.9.1", "@xterm/addon-serialize": "^0.14.0", "@xterm/headless": "^6.0.0", "chai": "^4.5.0", "chai-as-promised": "^7.1.2", "chai-subset": "^1.6.0", "decompress": "^4.2.1", "del-cli": "^7.0.0", "diff": "^9.0.0", "esbuild": "^0.28.0", "eslint": "^10.2.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.5.5", "eslint-plugin-sonarjs": "^4.0.3", "globals": "^17.6.0", "husky": "^9.1.7", "knip": "^6.12.0", "lint-staged": "^17.0.2", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", "micromatch": "^4.0.8", "mocha": "^11.7.5", "mock-fs": "^5.5.0", "octokit": "^3.2.2", "prettier": "^3.8.3", "replace-in-file": "^8.4.0", "semver": "^7.7.4", "simple-git": "^3.36.0", "sinon": "^22.0.0", "sinon-chai": "^3.7.0", "source-map-support": "^0.5.21", "strip-ansi": "^6.0.1", "svgo": "^4.0.1", "tsconfig-paths": "^4.2.0", "tsx": "^4.21.0", "typescript": "^6.0.3", "vscode-tmgrammar-test": "^0.1.3", "winston": "^3.19.0", "winston-transport": "^4.9.0" }, "dependencies": { "@vscode/codicons": "^0.0.45", "archiver": "^7.0.1", "fast-glob": "^3.3.3", "lcov-parse": "^1.0.0", "plist": "=3.1.0", "tar": "^7.5.14", "vscode-languageclient": "^9.0.1", "xml2js": "^0.6.2", "zod": "^4.1.5" } }