Skip to main content
On this page

Commands and settings

Every KXBuild command in the Command Palette, grouped by purpose and showing where else you can find it. Every setting with its default and effect, the launch and attach fields of the kxbuild debugger, and the four output channels.

Type KXBuild in the Command Palette (Ctrl+Shift+P) to see every command. Commands marked "context menu only" or "inside the editor only" appear only in those places. To find the settings, search for kxbuild in Settings.

Commands

Environment

CommandWhere
KXBuild: Doctor (fix environment)Command Palette · view title bar "···"
KXBuild: Install ToolchainCommand Palette · view title bar "···" · view welcome screen
KXBuild: Select ToolchainCommand Palette · view title bar "···" · view welcome screen
KXBuild: Diagnose DevicesView title bar "···" · "click to set up" on the device node

Projects

CommandWhere
KXBuild: New ProjectCommand Palette · view title bar "···"
KXBuild: Import uni-app ProjectCommand Palette · view title bar "···"
KXBuild: Convert Swift Package to App ProjectCommand Palette · the hint row in the view (when the folder only has a Package.swift)
KXBuild: Add Swift Package Dependency…Command Palette · right-click a target node in the view
KXBuild: Select Startup ProjectCommand Palette · view title bar "···" · project node
KXBuild: Mark as Startup ProjectContext menu only, on a .xcodeproj / .xcworkspace in the Explorer
KXBuild: Project Settings…Command Palette · right-click a .xcodeproj / .xcworkspace
KXBuild: Edit Project Settings / Edit Target SettingsContext menu only, on a project node / target node in the view

Build and run

CommandWhere
KXBuild: BuildCommand Palette · view title bar · right-click a .xcodeproj / .xcworkspace
KXBuild: Build & RunCommand Palette · view title bar · F5 · right-click a .xcodeproj / .xcworkspace
KXBuild: RunCommand Palette · view title bar
KXBuild: Build Target / Build & Run Target / Run Target (no build)Target node inline buttons only
KXBuild: Select iOS DeviceCommand Palette · Status Bar · device node
KXBuild: Select Build ConfigurationCommand Palette · view title bar "···" · configuration node
KXBuild: Attach to Running AppCommand Palette · view title bar "···"
Refresh DevicesView title bar only

Code

CommandWhere
KXBuild: Generate compile_commands.jsonContext menu only, on a .xcodeproj / .xcworkspace in the Explorer
KXBuild: Restart Code CompletionCommand Palette
KXBuild: Re-Index ProjectCommand Palette

Editors

CommandWhere
KXBuild: Open with Property List EditorRight-click a .plist / .entitlements / .xcprivacy / .strings · editor title bar in text mode
KXBuild: Open plist as TextEditor title bar (in the Property List Editor)
KXBuild: Plist Save Format (XML / Binary)Editor title bar (in the Property List Editor)
KXBuild: Convert plist to XML / Convert plist to BinaryRight-click a .plist / .entitlements / .xcprivacy (multiple selection works)
Add Row · Add Child · Delete Row · Copy Key Path · Expand All · Collapse AllContext menu inside the Property List Editor only
KXBuild: Open Asset CatalogCommand Palette · right-click a .xcassets folder
KXBuild: Open with Asset Catalog Editor / Open Contents.json as TextRight-click a Contents.json inside a .xcassets · editor title bar
KXBuild: Reload Asset CatalogEditor title bar (in the Asset Catalog Editor)
KXBuild: Compile-check Asset CatalogCommand Palette · editor title bar (in the Asset Catalog Editor)
New App Icon / Image Set / Color Set / Data Set / Symbol Image Set / Folder · New App Icon (visionOS) · New App Icon & Top Shelf Image (tvOS) · New Image Stack (tvOS) · Rename · Delete · Reveal in Explorer · Fill All Sizes from 1024×1024 Image… · Convert to Single Size Icon · Add Platform… · Replace Image… · Remove ImageContext menu inside the Asset Catalog Editor only
KXBuild: Open with Project Settings Editor / Open project.pbxproj as TextRight-click project.pbxproj · editor title bar
Add User-Defined Setting · Delete Setting · Copy Setting Name · Copy ValueContext menu inside the Project Settings Editor only
KXBuild: Open Icon Document (.icon)Command Palette · right-click a .icon folder
KXBuild: Open with Icon Document Editor / Open icon.json as TextRight-click the icon.json inside a .icon · editor title bar
KXBuild: Icon — Add Group / Add Layer / Import Assets…Inside the Icon Document Editor only

Settings

Press Ctrl+, to open Settings and type kxbuild in the search box to see just these settings. You can also click KXBuild under Extensions on the left. Checkboxes and drop-downs apply as soon as you change them, with no restart. For arrays and paths, click "Edit in settings.json" and write them like this.

settings.json "kxbuild.defaultConfiguration": "Release"

The User tab at the top of Settings applies to every window. Workspace applies only to the current project and is saved in its .vscode\settings.json, so put settings your team shares there. Settings marked "user settings only" have no effect in the workspace.

KXBuild

SettingDefaultDescription
kxbuild.toolchainHomeEmptyDirectory containing the KXBuild toolchain. Probed before KXBUILD_HOME and PATH. User settings only.
kxbuild.ignoreMissingToolchainWarningfalseDo not warn at startup when no KXBuild toolchain is found
kxbuild.autoUpdatetrueAt startup, check for a newer kxbuild. If there is one, update it in a terminal and run doctor.
kxbuild.defaultConfigurationDebugBuild configuration selected at startup
kxbuild.build.extraArgs[]Extra arguments appended to every kxbuild build invocation. Each flag and value is a separate array entry.
kxbuild.debug.killAppOnStoptrueKill the app on the device when the debug session stops
kxbuild.flutter.autoAttachDarttrueFor Flutter apps, start the Dart debug session automatically when the app prints its VM service URL

KXBuild Swift

SettingDefaultDescription
kxbuild.swiftPathEmptyFolder containing the Swift executables. The lldb-dap debug adapter is also resolved from this folder. User settings only.
kxbuild.swiftRuntimePathEmptyDirectory holding the Swift runtime libraries. Empty uses the runtime next to the toolchain, Developer\Runtimes\<version>\usr\bin.
kxbuild.outputChannelLogLevelinfoThe log level of the Swift output channel: debug, info, warn or error

KXBuild SourceKit-LSP

SettingDefaultDescription
kxbuild.swiftSourcekitLspServerPathEmptyThe path of the sourcekit-lsp executable. Empty looks in the folder where swift is found.
kxbuild.swiftSourcekitLspServerArguments[]Arguments to pass to SourceKit-LSP
kxbuild.swiftSourcekitLspSupportedLanguages["swift"]Languages SourceKit-LSP handles. C-family languages are handled by clangd.
kxbuild.swiftSourcekitLspBackgroundIndexingautoTurns background indexing on or off. auto enables it on Swift 6.1 and later.
kxbuild.swiftSourcekitLspTraceServeroffLogs the communication between VS Code and the language server: off, messages or verbose
kxbuild.swiftSourcekitLspDisablefalseDisable SourceKit-LSP

KXBuild Property List Editor

SettingDefaultDescription
kxbuild.plist.defaultSaveFormatpreserveFormat the property list editor saves files in: keep the format the file was opened in, always save as XML, or always save as binary
kxbuild.plist.sortKeysOnSavefalseSort dictionary keys alphabetically when saving, like Xcode
kxbuild.plist.showRootRowtrueShow a Root row above the top-level keys
kxbuild.plist.spacingcompactVertical spacing of rows: compact, comfortable or spacious

KXBuild Asset Catalog Editor

SettingDefaultDescription
kxbuild.xcassets.deleteUnreferencedFilesaskWhat to do with image files no entry references after an edit: ask each time, delete them without asking, or keep them

KXBuild: Project Settings

SettingDefaultDescription
kxbuild.xcodeproj.livePreviewtrueRecompute resolved build settings after each change
kxbuild.xcodeproj.defaultModebasicWhich settings the Build Settings page shows when it opens: basic, customized or all

The kxbuild debugger

Set "type" to kxbuild in launch.json. For an example, see Run and debug.

requestFieldDescription
launchbuildtrue builds first. false installs the most recent build (default).
deviceDevice UDID. Empty uses the device selected in the view.
bundleBundle ID of the app target. Empty uses the only app target.
configurationDebug or Release. Empty uses the one selected in the view.
attachdeviceSame as above
attachPidProcess ID on the device. 0 shows a list to pick from when the session starts.

Output channels

ChannelContents
KXBuildBuild logs, the extension's own log, and template script output
KXBuild Consolestdout, stderr, NSLog and os_log from the app being debugged, with runtime noise filtered out
SwiftLogs from the Swift integration. The level is set by kxbuild.outputChannelLogLevel.
SourceKit Language ServerCommunication with SourceKit-LSP. Needs traceServer turned on.

Build errors and asset catalog check results appear in the Problems panel.

Next steps