Using breakpoint in file started by script/runner

Does anyone know if this is possible? I’m trying to debug a file that is started using script/runner, but breakpoints don’t seem to be honored here. Is there a way to make them or some alternative?



Answering my own question here…I was able to get ruby-debug to work for this by ensuring I called it as such:

/usr/bin/rdebug -s -n -w – script/runner $MYCMD

Note the – (double hyphens) to cause rdebug to stop interpreting option flags (so that you can pass flags to script/runner.

Hope this helps someone else.


Forgot to mention…the above sets the debugger to run detached. After your command has executed, type “rdebug -c” in another terminal to connect to the daemon.