Skip to main content
On this page

How to start iOS app development in VS Code in five minutes

Install the extension, open your project, pick a run destination and press Cmd+R to stop at your first breakpoint on a simulator or iPhone.

Last updated

iOS app development in VS Code takes about five minutes to set up. Install the KXApp extension in VS Code or Cursor, open the folder that contains your .xcodeproj or .xcworkspace, pick a simulator or an iPhone and press Cmd+R. KXApp builds, installs and launches the app, then stops at your first breakpoint. Before you start, make sure Xcode is installed on your Mac and has been opened at least once.

Step 1: How do I install the extension?

In VS Code's Extensions view (Cmd+Shift+X), search for kxapp and install it; the extension ID is kxapp.kxapp. For Cursor, VSCodium or an offline install, see Install: those editors install from Open VSX, or from a downloaded VSIX.

Step 2: How do I open an Xcode project in VS Code?

Use File › Open Folder… on the folder that contains your .xcodeproj or .xcworkspace (the project can be in a subfolder). Once the project is found:

  • The Xcode Project view appears in the activity bar, listing the project, scheme, configuration, run destination, devices and simulators, and targets.
  • The status bar shows the scheme and configuration, the run destination and a build button.

When a .xcworkspace and a .xcodeproj with the same name sit side by side (as in CocoaPods projects), the workspace is used. If the folder holds several different projects, click the Project row in the view to switch.

Step 3: How do I pick a scheme and a run destination?

Click the scheme in the status bar to choose the app to run, then click the run destination to choose a simulator or an iPhone connected by cable. Before using a device for the first time:

  • Unlock it, tap Trust This Computer, and turn on Developer Mode in Settings › Privacy & Security.
  • Let Xcode prepare it once in Window › Devices and Simulators, so debugging is fast afterwards.
  • Sign in with your Apple ID in Xcode › Settings › Accounts and use automatic signing.

Step 4: How do I run an iOS app from VS Code and hit a breakpoint?

Click left of a line number to set a breakpoint and press Cmd+R (or F5). The extension builds, installs, launches the app and attaches the debugger. When the breakpoint hits, variables, call stack and threads are in the Run and Debug view. Press Cmd+. to stop.

The debug view stopped at a breakpoint

The app's output is in Output › kxapp Console and the build log in Output › kxapp Build. Compile errors go to the Problems panel; click one to jump to the line.

What's next for iOS app development in VS Code?

As you keep up iOS app development in VS Code, switching configurations and running on a device are covered in build and run iOS apps in VS Code; conditional breakpoints, the debug console and attaching to a running app are in debug iOS apps on a real iPhone.

Frequently asked questions

What do I need to use KXApp?

A Mac with Xcode 16 or later, and VS Code 1.93 or later. KXApp builds, signs and debugs with the Xcode already on that Mac; Cursor, VSCodium and other VS Code based editors install it from Open VSX or a VSIX.

Is KXApp free? Do I need an account?

KXApp is free, with no account and no sign-in. The extension doesn't upload code and collects no usage statistics.

Can teammates keep opening the same project in Xcode?

Yes. KXApp works on your existing .xcodeproj or .xcworkspace and converts nothing, so teammates on Xcode aren't affected. What you built in VS Code doesn't need rebuilding when you switch to Xcode.

Are the shortcuts the same as in Xcode?

Yes: Cmd+R builds and runs, Cmd+B builds and Cmd+. stops. Cmd+B and Cmd+R apply while the editor has focus and an Xcode project is open.

Next steps