Skip to main content

VS Code extension

The SweetPad extension turns VS Code into a place you can build, run, debug, and test an Xcode app without switching to Xcode. It installs from the VS Code Marketplace and works with Xcode workspaces and projects, Tuist, XcodeGen, and Swift Packages.

Everything here works in Cursor too. It's a fork of VS Code, so the extension installs and behaves the same way.

tip

New here? Start with Get started with the extension: install it, open a project, and run your app on a simulator in about five minutes. This page is the fuller tour.

What you getโ€‹

  • ๐Ÿ› ๏ธ Build & Run apps on simulators, macOS, and physical devices straight from the SweetPad sidebar.
  • ๐Ÿž 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, and NSLog into the build terminal so you don't have to keep Console.app open.
  • ๐Ÿงช Tests show up in VS Code'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, including inline compiler diagnostics in the Problems panel.
  • ๐Ÿ”ฅ Hot reload applies a saved Swift file to the running app without a rebuild.
  • ๐ŸŒณ Git worktrees switch the active workspace between parallel checkouts of the same project in one command.
  • ๐Ÿงฐ Tools: one-click installs for the helper tools SweetPad can use.

Choosing where to runโ€‹

The Destinations view in the sidebar lists every simulator, connected device, and macOS. Pick one and SweetPad remembers it for the workspace. See Destinations, and Simulators and Devices for managing each kind.

Referenceโ€‹

When you need the exact name of something:

Do I need the CLI too?โ€‹

No, with one exception. Building, running, debugging, testing, and formatting all happen inside the extension. The default autocomplete setup is the exception: it runs SweetPad's build server, which ships inside the sweetpad CLI binary, so that one feature asks you to install the CLI. The Autocomplete page covers it.

If you want the terminal tool as well, it's a separate product with its own docs: SweetPad CLI.