XBridge — Build, Test, and Run Xcode Projects in VS Code
Stay in VS Code for the everyday Xcode workflow. Installation • Features • AI Tools • Physical Devices • Shortcuts • Contributing • Settings InstallationInstall XBridge from the Visual Studio Marketplace, or open the Extensions view in VS Code and search for Why XBridge?
Features1. Build, Run & Test
2. Physical iOS Device Support (
|
| Tool Reference | Tool Name | Description |
|---|---|---|
#iosBuild |
xbridge_build |
Compiles the active scheme and returns structured compiler errors and warnings. |
#iosTest |
xbridge_test |
Runs test suites (or an individual test) and reports test failures with file/line locations. |
#iosRun |
xbridge_run |
Builds, installs, and launches the app on the selected simulator or physical device. |
#iosDiagnostics |
xbridge_readDiagnostics |
Reads compiler errors and test failures from the last run without rebuilding. |
#iosClean |
xbridge_clean |
Cleans the Xcode build folder (DerivedData) for a fresh compilation. |
#iosSchemes |
xbridge_listSchemes |
Discovers available schemes, configurations, and build targets. |
#iosSimulators |
xbridge_listSimulators |
Lists all installed simulators and their status (Booted/Shutdown). |
#iosBoot |
xbridge_bootSimulator |
Boots a specified simulator by UDID and opens Simulator.app. |
AI Pair Programming Example: "Use
#iosBuildto compile the app. If there are any compiler errors, use#iosDiagnosticsto inspect the error lines, fix the Swift code, and re-run#iosBuilduntil it succeeds."
Requirements
- macOS with Xcode and command-line developer tools installed (
xcodebuild,xcrun simctl). - Physical device support requires Xcode 15+ (
xcrun devicectl). - For physical device builds, code signing (Development Team & Signing Identity) must be configured in your Xcode project.
Getting Started
- Open a workspace folder containing an
.xcodeproj,.xcworkspace, orPackage.swift. - Click the XBridge icon in the Activity Bar.
- Select your desired Scheme and Destination (Simulator or Connected Physical Device).
- Press
⌃⌘Bto build, or⌃⌘Rto build and launch!
Run XBridge: Getting Started from the Command Palette (⇧⌘P) anytime for a guided walkthrough.
Keyboard Shortcuts
| Command | macOS Shortcut | Description |
|---|---|---|
| XBridge: Build | ⌃⌘B | Build the current scheme |
| XBridge: Build & Run | ⌃⌘R | Build and launch on simulator or device |
| XBridge: Run Tests | ⌃⌘U | Run test plan or target |
| XBridge: Clean Build Folder | ⌃⌘K | Clean DerivedData build products |
| XBridge: Stop | ⌃⌘. | Cancel active build or terminate running app |
| XBridge: Select Destination | ⌃⌘D | Switch destination device or simulator |
| XBridge: Resolve Package Dependencies | ⌃⌘P | Resolve SPM package dependencies |
Settings
Configure XBridge in your User or Workspace settings.json:
| Setting | Type | Default | Description |
|---|---|---|---|
xbridge.projectPath |
string |
"" |
Path to .xcodeproj, .xcworkspace, or Package.swift (auto-detected if empty). |
xbridge.scheme |
string |
"" |
Xcode scheme to build. |
xbridge.configuration |
string |
"Debug" |
Build configuration (Debug or Release). |
xbridge.destination |
string |
"" |
UDID of the selected target simulator or physical device. |
xbridge.testPlan |
string |
"" |
.xctestplan to run, overriding scheme default. |
xbridge.testTarget |
string |
"" |
Specific test target to run (or all tests if empty). |
xbridge.derivedDataPath |
string |
"" |
Custom DerivedData directory. Defaults to .build/DerivedData. |
xbridge.extraBuildArgs |
array |
[] |
Extra arguments injected into xcodebuild invocations. |
xbridge.streamAppLogs |
boolean |
true |
Stream app stdout/stderr into the "XBridge App" output channel. |
xbridge.openSimulatorOnRun |
boolean |
true |
Focus Simulator.app when launching on a simulator. |
xbridge.autoRevealBuildLog |
boolean |
false |
Automatically show the build output channel when an action starts. |
Contributing
We welcome community contributions! Please read our Contributing Guide and Code of Conduct before submitting pull requests.
- Fork the repository: https://github.com/chaiwithcode/Xbridge
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
Released under the MIT License. Copyright © 2026 Deepak Sharma.