Introduction
SweetPad is a VSCode extension that lets you build, run, debug, and test your Xcode projects for iOS, macOS, tvOS, watchOS, and visionOS without leaving VSCode. It's built on top of the Xcode CLI tools, plus a handful of open-source tools like xcode-build-server, xcbeautify, swift-format, and pymobiledevice3.
You still need to have Xcode installed on your machine to use the extension because it heavily relies on the Xcode CLI tools to build and run your project.
What you getโ
- ๐ ๏ธ Build & Run apps on simulators, macOS, and physical devices straight from the SweetPad sidebar
โ with support for Xcode workspaces, Xcode projects, Tuist, XcodeGen, and Swift Package Manager
(
Package.swift). - ๐ Debug with breakpoints, step, watch, and the rest of LLDB via the CodeLLDB extension โ on the Simulator and on physical iOS devices.
- ๐ Logs from devices and simulators stream
os_log/Logger/print/NSLoginto the build terminal so you don't have to keep Console.app open. - ๐งช Tests show up in VSCode's native Testing panel with gutter โถ๏ธ buttons; supports XCTest and Swift Testing.
- โ๏ธ Format on save with
swift-format(Xcode's bundled copy by default) or any other Swift formatter you prefer. - ๐ก Autocomplete via SourceKit-LSP backed by
xcode-build-server, including inline compiler diagnostics in the Problems panel. - ๐ณ Git worktrees โ switch the active workspace between parallel checkouts of the same project in one command.
- ๐ค Agent CLI / RPC server โ opt-in JSON-RPC server and bundled
sweetpadCLI so scripts and AI coding agents can drive your VSCode session from the outside.
Getting startedโ
This tutorial also works for Cursor, an AI-first code editor that's a fork of VSCode.
First, install VSCode and the extension from the VSCode Marketplace.

Next, create an Xcode project. We highly recommend XcodeGen or
Tuist, which let you define the project structure in configuration files โ but plain Xcode is
fine too. SweetPad also works directly with Swift Packages: open a folder that contains a Package.swift and you're
good to go.

Once you have a working Xcode project, open the project's root folder in VSCode โ not the .xcodeproj or
.xcworkspace folder itself.
If you installed the extension correctly, you should see the SweetPad lollipop icon ๐ญ in the left sidebar of the editor. This is the main entry point for using the extension.
The main panels of the extension are:
- Build โ shows the list of schemes and the "Launch" button to build and run the project.
- Destinations โ lists every place you can run on: recently used destinations, simulators, and connected devices.
- Tools โ installs and links to docs for the third-party tools SweetPad uses.

To build and run the project, click โถ๏ธ next to the scheme and wait for the build to finish. SweetPad then boots the simulator and launches the app.
That's it โ you've built and run your first Xcode project in VSCode. From here:
- Configure format on save so Swift files reformat themselves on save.
- Install
xcbeautifyfor readable build logs โ the Tools panel handles it. - Explore the rest of the features.
Demoโ
Here is a short demo of building and running an Xcode project in VSCode: