IDE Integration

Configure your development environment for efficient plugin development with BeatConnect.

IDEPlatformBest For
VS CodeAllLightweight, extensible
CLionAllFull-featured C++ IDE
XcodemacOSNative macOS development
Visual StudioWindowsNative 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"
  ]
}
ExtensionPurpose
C/C++IntelliSense, debugging
CMake ToolsBuild integration
CMakeSyntax highlighting
Clang-FormatCode formatting
CodeLLDBDebugging (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

  1. Open project folder in CLion
  2. CLion auto-detects CMakeLists.txt
  3. 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:

ProfileBuild TypeCMake Options
DebugDebug(none)
ReleaseRelease(none)
macOS UniversalRelease-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"

Run Configurations

Run → Edit Configurations

  1. Standalone App:

    • Target: MyPlugin (Standalone)
    • Executable: Auto-detected
  2. 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.xcodeproj

Scheme Configuration

  1. Select your plugin target
  2. Product → Scheme → Edit Scheme
  3. Configure Run action:
    • Executable: Choose DAW or Standalone
    • Arguments: (optional)

Debugging VST3/AU in DAW

  1. Build your plugin
  2. Copy to plugin folder:
    cp -r build/MyPlugin_artefacts/Debug/VST3/MyPlugin.vst3 ~/Library/Audio/Plug-Ins/VST3/
  3. Set Xcode executable to your DAW
  4. Debug → Attach to Process or just Run

Performance Profiling

Use Instruments for performance analysis:

  1. Product → Profile (Cmd+I)
  2. 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.sln

Solution Configuration

  1. Set startup project to your plugin
  2. Debug → Properties:
    • Command: Path to your DAW
    • Working Directory: DAW folder

Debugging in DAW

  1. Build Debug configuration
  2. Copy VST3 to plugin folder:
    Copy-Item -Recurse build\MyPlugin_artefacts\Debug\VST3\MyPlugin.vst3 "C:\Program Files\Common Files\VST3\"
  3. Debug → Start Debugging (F5)
  4. Launch DAW and load plugin

Performance Analysis

Use Visual Studio Profiler:

  1. Debug → Performance Profiler
  2. Select:
    • CPU Usage — Find hot spots
    • .NET Allocs — Memory analysis
  3. 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 = 2

compile_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

// 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

  1. Conditional breakpoints — Break only when value is wrong
  2. Data breakpoints — Break when memory changes
  3. 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);
}
  1. Develop locally — Fast iteration with IDE debugging
  2. Test standalone first — Easier to debug
  3. Test in DAW — Verify real-world behavior
  4. Push to GitHub — Trigger BeatConnect build
  5. Test signed build — Verify final product

Next Steps