IDE Integration
Configure your development environment for efficient plugin development with BeatConnect.
Recommended IDEs
| IDE | Platform | Best For |
|---|---|---|
| VS Code | All | Lightweight, extensible |
| CLion | All | Full-featured C++ IDE |
| Xcode | macOS | Native macOS development |
| Visual Studio | Windows | Native Windows development |
VS Code Setup
Required Extensions
Install these extensions for the best experience:
// .vscode/extensions.json
{
"recommendations": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"twxs.cmake",
"xaver.clang-format",
"vadimcn.vscode-lldb"
]
}| Extension | Purpose |
|---|---|
| C/C++ | IntelliSense, debugging |
| CMake Tools | Build integration |
| CMake | Syntax highlighting |
| Clang-Format | Code formatting |
| CodeLLDB | Debugging (macOS/Linux) |
Workspace Settings
Create .vscode/settings.json:
{
"cmake.configureOnOpen": true,
"cmake.buildDirectory": "${workspaceFolder}/build",
"cmake.generator": "Ninja",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
"editor.formatOnSave": true,
"C_Cpp.clang_format_fallbackStyle": "LLVM",
"files.associations": {
"*.h": "cpp"
}
}Launch Configuration
Create .vscode/launch.json for debugging:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Standalone",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build/MyPlugin_artefacts/Debug/Standalone/MyPlugin.app",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "Build Debug"
},
{
"name": "Attach to DAW",
"type": "lldb",
"request": "attach",
"program": "/Applications/Ableton Live 11 Suite.app"
}
]
}Tasks
Create .vscode/tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Configure",
"type": "shell",
"command": "cmake",
"args": ["-B", "build", "-DCMAKE_BUILD_TYPE=Debug"],
"group": "build"
},
{
"label": "Build Debug",
"type": "shell",
"command": "cmake",
"args": ["--build", "build", "--config", "Debug"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"]
},
{
"label": "Build Release",
"type": "shell",
"command": "cmake",
"args": ["--build", "build", "--config", "Release"],
"group": "build"
}
]
}Keyboard Shortcuts
Recommended shortcuts in keybindings.json:
[
{
"key": "cmd+shift+b",
"command": "workbench.action.tasks.runTask",
"args": "Build Debug"
},
{
"key": "f5",
"command": "workbench.action.debug.start"
}
]CLion Setup
CMake Configuration
- Open project folder in CLion
- CLion auto-detects CMakeLists.txt
- Configure toolchains:
Settings → Build, Execution, Deployment → Toolchains
Name: Default
CMake: /usr/local/bin/cmake (or detected)
Build Tool: ninja (recommended)
C Compiler: clang
C++ Compiler: clang++
CMake Profiles
Settings → Build, Execution, Deployment → CMake
Add profiles:
| Profile | Build Type | CMake Options |
|---|---|---|
| Debug | Debug | (none) |
| Release | Release | (none) |
| macOS Universal | Release | -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" |
Run Configurations
Run → Edit Configurations
-
Standalone App:
- Target: MyPlugin (Standalone)
- Executable: Auto-detected
-
Attach to DAW:
- Type: Attach to Process
- Process: (select DAW when running)
Useful Plugins
- CMake (bundled)
- JUCE (community plugin)
- Audio (syntax for audio-specific files)
Xcode Setup
Generate Xcode Project
cmake -B build -GXcode
open build/YourPlugin.xcodeprojScheme Configuration
- Select your plugin target
- Product → Scheme → Edit Scheme
- Configure Run action:
- Executable: Choose DAW or Standalone
- Arguments: (optional)
Debugging VST3/AU in DAW
- Build your plugin
- Copy to plugin folder:
cp -r build/MyPlugin_artefacts/Debug/VST3/MyPlugin.vst3 ~/Library/Audio/Plug-Ins/VST3/ - Set Xcode executable to your DAW
- Debug → Attach to Process or just Run
Performance Profiling
Use Instruments for performance analysis:
- Product → Profile (Cmd+I)
- Choose template:
- Time Profiler — CPU usage
- Allocations — Memory usage
- Audio — Audio-specific metrics
Code Signing for Local Builds
For local testing, disable code signing:
# Only for local development!
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")Note: BeatConnect handles code signing for production builds.
Visual Studio Setup
Generate Visual Studio Solution
cmake -B build -G "Visual Studio 17 2022" -A x64
start build\YourPlugin.slnSolution Configuration
- Set startup project to your plugin
- Debug → Properties:
- Command: Path to your DAW
- Working Directory: DAW folder
Debugging in DAW
- Build Debug configuration
- Copy VST3 to plugin folder:
Copy-Item -Recurse build\MyPlugin_artefacts\Debug\VST3\MyPlugin.vst3 "C:\Program Files\Common Files\VST3\" - Debug → Start Debugging (F5)
- Launch DAW and load plugin
Performance Analysis
Use Visual Studio Profiler:
- Debug → Performance Profiler
- Select:
- CPU Usage — Find hot spots
- .NET Allocs — Memory analysis
- Run and analyze
Common Setup
.clang-format
Standardize code formatting:
# .clang-format
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 120
BreakBeforeBraces: Allman
AllowShortFunctionsOnASingleLine: None
SortIncludes: true
# JUCE-specific
AlwaysBreakAfterDefinitionReturnType: None.editorconfig
Cross-IDE consistency:
# .editorconfig
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{h,cpp}]
indent_size = 4
[CMakeLists.txt]
indent_size = 2compile_commands.json
Enable for better IntelliSense:
# In CMakeLists.txt
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)This generates build/compile_commands.json for IDEs.
Debugging Tips
Print Debugging
// JUCE debugging
DBG("Value: " << value);
// Standard output (visible in some DAWs)
std::cout << "Debug: " << value << std::endl;
// Log to file
static File logFile(File::getSpecialLocation(File::userDesktopDirectory)
.getChildFile("plugin_debug.log"));
logFile.appendText(String("Value: ") + String(value) + "\n");Breakpoint Tips
- Conditional breakpoints — Break only when value is wrong
- Data breakpoints — Break when memory changes
- Logpoints — Print without stopping
Audio Thread Safety
Never break in audio thread! Use:
// Safe audio-thread debugging
if (isAudioThread())
{
// Log to lock-free queue instead
debugQueue.push(value);
}
else
{
DBG("Value: " << value);
}Recommended Workflow
- Develop locally — Fast iteration with IDE debugging
- Test standalone first — Easier to debug
- Test in DAW — Verify real-world behavior
- Push to GitHub — Trigger BeatConnect build
- Test signed build — Verify final product