.vscode folder and provide powerful debugging capabilities for your iOS/macOS projects.
Creating a Debug Configuration
1
Open Debug panel
Click the Debug icon in the Activity Bar or press
⌘⇧D2
Create launch.json
Click Create a launch.json file in the Debug panel
3
Select FlowDeck
Choose FlowDeck (LLDB) from the list
4
Configuration created
A new
.vscode/launch.json file is created with default settingsBasic Configuration
Here’s the basiclaunch.json configuration for FlowDeck:
Configuration Properties
Essential Properties
| Property | Type | Description |
|---|---|---|
type | string | Must be flowdeck-lldb for FlowDeck debugging |
request | string | Use attach to attach to running process |
name | string | Display name in the Debug dropdown |
preLaunchTask | string | Task to run before debugging (usually build) |
Presentation Options
Control how the debug session appears:Multiple Debug Configurations
Define different debug configurations for various scenarios:Environment Variables
Pass environment variables to your debug session:Launch vs Attach
FlowDeck supports two request types:Attach Mode (Recommended)
- Builds and launches the app, then attaches debugger
- Most common and reliable method
Custom Attach
- Attaches to an already running process
- Useful for debugging app extensions or background processes
Debugging with Breakpoints
Conditional Breakpoints
Right-click on a breakpoint to add conditions:- Expression - Break when expression is true
- Hit Count - Break after N hits
- Log Message - Log without stopping
Exception Breakpoints
Configure in the Breakpoints panel:- All Exceptions - Break on any exception
- Uncaught Exceptions - Break only on unhandled exceptions
- Swift Errors - Break on Swift error throws
Tips and Best Practices
- Pre-launch Tasks - Always specify a
preLaunchTaskto ensure fresh builds - Multiple Configurations - Create separate configs for simulator vs device debugging
- Environment Variables - Use different API endpoints for debug builds
- Presentation Options - Hide output for cleaner debugging experience
- Compound Configurations - Chain multiple debug sessions together
Troubleshooting
Common Issues
- Debugger not attaching - Ensure the app is built with debug symbols
- Breakpoints not hitting - Check that optimization is disabled in debug builds
- Variables not visible - Make sure you’re using Debug build configuration
For more information about VS Code debugging, see the official debugging documentation.
