Skip to main content
On this page

Sidebar and Status Bar

Where the extension lives in VS Code. What each KXBuild view node, title bar button, context menu item and Status Bar item does, where to pick your iPhone once it's connected, and which panel shows app output and build logs.

The four places the KXBuild extension appears in VS Code
No.LocationWhat it does
①Activity Bar iconOpens the KXBuild view
②View title barBuild & Run, Run, Build and Refresh Devices. The "···" menu on the right has more commands.
③View nodesDevice, build configuration, projects and targets. Click to switch or act on them.
④Status BarCurrent project type, device and configuration. Click to switch devices.

View nodes

NodeShowsClick to
DeviceThe current device name, connection and iOS version, for example USB · iOS 17.5. Shows "click to set up" when the device driver is missing.Switch devices, or install the driver
Build configurationDebug or ReleaseSwitch the build configuration
ProjectEvery .xcworkspace / .xcodeproj in the open folder. With several projects, the startup project has a star.Expand it, or make it the startup project
TargetEvery target in the project, with its type after the name: app, test, extension, framework, library or bundleBuild the target with the inline button. Runnable targets also have Build & Run and Run.
Asset catalogThe .xcassets in the project folderOpen the Asset Catalog Editor

If targets don't load, run doctor once.

Title bar and context menus

LocationCommands
Title bar buttonsBuild & Run · Run · Build · Refresh Devices
Title bar "···" menuNew Project · Import uni-app Project · Doctor (fix environment) · Select Build Configuration · Attach to Running App · Select Startup Project · Select Toolchain · Install Toolchain
Right-click a project nodeEdit Project Settings
Right-click a target nodeEdit Target Settings
Right-click a .xcodeproj / .xcworkspace in the ExplorerBuild & Run · Build · Mark as Startup Project · Generate compile_commands.json · Project Settings…

In the Command Palette all of these start with "KXBuild:", so press Ctrl+Shift+P and type KXBuild to find them.

Status Bar

The bottom-right corner shows project type · device name · Debug. A spinner appears while KXBuild is busy, and hovering shows the current state. Click it to switch devices. To switch the configuration, use the build configuration node in the view.

Devices and logs

Plug in your iPhone with a cable and it shows up right away in the device node and the Status Bar. No refresh is needed when you plug or unplug. With several devices connected, click the device node or the Status Bar to pick one. F5 and Build & Run both install to that device. If the device node says "click to set up", the device driver isn't installed yet. Click it and follow the prompts. See Set up your device.

WhatWhere
App output from print, NSLog and os_logOutput panel > KXBuild Console
Build logOutput panel > KXBuild
Compiler errors and warningsProblems panel. Click one to jump to the source.

Open the Output panel with Ctrl+Shift+U and use the drop-down in its top-right corner to switch between KXBuild and KXBuild Console. When a build or run fails, the notification has a "Show Output" button that takes you straight to the log.

Startup project

When a window holds several projects, F5, the title bar buttons and the Status Bar all act on the startup project. Click a project node to switch, or right-click a .xcodeproj in the Explorer and choose "Mark as Startup Project". To build one library or extension on its own, click the button on its target row. You don't need to switch the startup project.

Next steps