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.
| No. | Location | What it does |
|---|---|---|
| ① | Activity Bar icon | Opens the KXBuild view |
| ② | View title bar | Build & Run, Run, Build and Refresh Devices. The "···" menu on the right has more commands. |
| ③ | View nodes | Device, build configuration, projects and targets. Click to switch or act on them. |
| ④ | Status Bar | Current project type, device and configuration. Click to switch devices. |
View nodes
| Node | Shows | Click to |
|---|---|---|
| Device | The 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 configuration | Debug or Release | Switch the build configuration |
| Project | Every .xcworkspace / .xcodeproj in the open folder. With several projects, the startup project has a star. | Expand it, or make it the startup project |
| Target | Every target in the project, with its type after the name: app, test, extension, framework, library or bundle | Build the target with the inline button. Runnable targets also have Build & Run and Run. |
| Asset catalog | The .xcassets in the project folder | Open the Asset Catalog Editor |
If targets don't load, run doctor once.
Title bar and context menus
| Location | Commands |
|---|---|
| Title bar buttons | Build & Run · Run · Build · Refresh Devices |
| Title bar "···" menu | New 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 node | Edit Project Settings |
| Right-click a target node | Edit Target Settings |
| Right-click a .xcodeproj / .xcworkspace in the Explorer | Build & 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.
| What | Where |
|---|---|
| App output from print, NSLog and os_log | Output panel > KXBuild Console |
| Build log | Output panel > KXBuild |
| Compiler errors and warnings | Problems 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
Run and debug
Three ways to start (Build & Run, Run and Attach), what you see if a step fails after F5, panels and output during a debug session, launch.json fields and Dart debugging for Flutter.
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.