launch: program 'Rack' does not exist

Hello,

I’m trying to debug Rack plugins in VS Code on Mac OS. I have a problem launching Rack when debugging, it gives “launch: program ‘Rack’ does not exist” error and doesn’t launch Rack. I tried using “/Applications/Rack” but it doesn’t help. You can find my launch.json below:

{

"version": "0.2.0",
"configurations": [
    {
    "name": "Launch",
    "type": "cppdbg",
    "request": "launch",
    "program": "Rack",
    "args": [],
    "stopAtEntry": false,
    "cwd": "${workspaceFolder}",
    "environment": [],
    "externalConsole": false
  },
  {
    "name": "Build and Launch",
    "type": "cppdbg",
    "request": "launch",
    "program": "Rack",
    "args": [],
    "stopAtEntry": false,
    "cwd": "${workspaceFolder}",
    "environment": [],
    "externalConsole": false,
    "preLaunchTask": "Build application and add to Rack plugin folder"
  },
  {
    "name": "Launch Debug",
    "type": "cppdbg",
    "request": "launch",
    "program": "Rack",
    "args": [],
    "stopAtEntry": false,
    "cwd": "${workspaceFolder}",
    "environment": [],
    "externalConsole": false,
    "MIMode": "lldb",
    "preLaunchTask": "Build application and add to Rack plugin folder",
    "setupCommands": [
        {
            "description": "Enable pretty-printing for gdb",
            "text": "-enable-pretty-printing",
            "ignoreFailures": true
        }
    ]
  }
]

}

Thanks in advance

Problem solved by building VCV Rack from source and using resulting executable Rack file.

hi, I have the same problem. can somebody explain me how to get it works?

Hi @swatinogi , it didn’t work with the Rack.app binary I downloaded and gave the error. I then downloaded VCV source code and compiled it which gave me a Rack executable file. When I used that it works.

Now my breakpoint doesn’t work, Rack runs in debugger but no break. It says “Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained.” Any ideas?

well I don’t know how to figured it out… with my prolem and also with yours @tolga.inci . also to me the source code does not work.

That message usually means that the binary file that’s running, is not the one that the debugger is expecting. Possibly Rack is finding and loading the dll from a directory other than the one you building in.

1 Like

I suspect submarine is correct, you aren’t loading the version of the plugin that you are building. It looks from the configuration that you are “adding plugin to the rack plugin folder”, but when you build your plugin to run in your own debug version of Rack there is no extra stop to add/install your plugin. Rack just finds it.

The folder structure for this is Rack/plugins/. Are you set up this way?

When you run rack do you see your plugin changes?

1 Like

Hello,

The task is below:

{
  "label": "Build application and add to Rack plugin folder",
  "type": "shell",
  "command": "make install",
  "options": {
    "cwd": "${workspaceRoot}",
    "env":{
        "RACK_DIR": "/Users/tolgainci/Documents/Rack/Rack-1/Rack"
    }
  }

It basically runs make install command from within VS Code. This copies the compiled plugin to user plugin folder, in my case:

“/Users/tolgainci/Documents/Rack/plugins-v1”

I build from within Rack source plugins folder:

“/Users/tolgainci/Documents/Rack/Rack-1/Rack/plugins/MyPlugin”

I use this path to launch Rack from VS Code:

/Users/tolgainci/Documents/Rack/Rack-1/Rack/Rack

When Rack is launched while debugging it loads the plugins from “”/Users/tolgainci/Documents/Rack/plugins-v1" folder where I copy them with make install.

Are you saying Rack should load the plugins from “/Users/tolgainci/Documents/Rack/Rack-1/Rack/plugins/” that is my build folder instead? If so how can I achieve this?

Thanks in advance

I discovered something: When I run Rack by double clicking, or by triggering it within VS Code like this “/Users/tolgainci/Documents/Rack/Rack-1/Rack/Rack” it loads the plugins folder from "“/Users/tolgainci/Documents/Rack/plugins-v1”

When I execute “make run” in the terminal from Rack source directory “/Users/tolgainci/Documents/Rack/Rack-1/Rack/” it correctly loads the plugins from ““/Users/tolgainci/Documents/Rack/Rack-1/Rack/plugins” directory.

So I guess I need this make run behavior in VS code debugging

I finally have the solution, it works! I had actually followed a tutorial for Windows which I think over complicated things.

The solution is here: https://community.vcvrack.com/t/debug-in-vscode-with-rack-sdk/2372/29

I just opened my source Rack folder in VS code, made the settings in c_cpp_properties.json and launch.json and it works as simple as that.

For Mac OS I definitely advise compiling and debugging from Rack source and not the SDK.

Thank you all for your help, I hope someone will find this useful in the future.

yes. your for super don’t want any plugins-v1 nonsense.

I only know the “old way” to do this, and it always works.

my rack is in /c/Rack my plugins are in /c/Rack/plugins/SquinkyLabsVCV

from /c/Rack I run make which builds rack

from squinky labs folder I run make, which builds my plugin, and does not copy them anywhere.

From /c/Rack I run make run and it runs rack and my new plugin is loaded.

From /c/Rack I run make debug and it runs gdb, which loads Rack and my plugin and lets me debug them just fine.

In this old workflow there is no need to copy a plugin, since rack looks for them down there already.

1 Like

The last thing I did was to comment out stripping and optimization by modifying these Rack files:

plugin.mk

line 62 # (STRIP) -s dist/"(SLUG)"/$(TARGET)

compile.mk

line 15 # FLAGS += -O3 -march=nocona -funsafe-math-optimizations

Now I can see all my variables and values by hovering on the code. Works like a charm :slight_smile:

I ran into this same problem, it helped when I added the workspace folder to my program line in 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": "${workspaceFolder}/Rack",
      "args": ["-d"],
      "stopAtEntry": false,
      "cwd": "${workspaceFolder}",
      "environment": [],
      "externalConsole": false,
      "MIMode": "lldb"
    }
  ]
}```