Debug in VSCode with Rack-SDK?

Okay then. I’m going ahead and share my debug config for MacOS. I didn’t use the SDK but checked out the complete VCVRack from github and compiled it.

Using the C/C++ Extension from Microsoft.

Rack/.vscode/c_cpp_properties.json

{
  "configurations": [
    {
      "name": "Mac",
      "includePath": ["${workspaceFolder}/**"],
      "defines": [],
      "macFrameworkPath": [
        "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks",
      ],
      "compilerPath": "/usr/bin/clang",
      "cStandard": "c11",
      "cppStandard": "c++11",
      "intelliSenseMode": "clang-x64"
    }
  ],
  "version": 4
}

Rack/.vscode/launch.json

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "(lldb) Launch",
      "type": "cppdbg",
      "request": "launch",
      "program": "Rack",
      "args": ["-d"],
      "stopAtEntry": false,
      "cwd": "${workspaceFolder}",
      "environment": [],
      "externalConsole": false,
      "MIMode": "lldb"
    }
  ]
}

I’m not using a launch task, just using the terminal for executing make make dep for Plugins but not installing them. I’m running Rack from the source folder of rack and the plugins subdirectory. Works like a charm. And you have two isolated environments, when running Rack in development mode with "args": ["-d"].

2 Likes