Quick start
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.
From installing the extension to hitting your first breakpoint on a simulator or iPhone takes about five minutes. Before you start, make sure Xcode is installed on your Mac and has been opened at least once.
1. Install the extension
In VS Code's Extensions view (Cmd+Shift+X), search for kxapp and install it. For Cursor, VSCodium or an offline install, see Install.
2. Open the folder that contains your project
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.
3. 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.
4. Set a breakpoint and press Cmd+R
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 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.
Next
- Code completion takes a few seconds to get ready the first time, see Code completion.
- To edit Info.plist, icons, localizations and build settings, see Visual editors.
- To run unit tests, see Tests.