This can be useful to debug something in production mode. Add rbtrace to your Gemfile, and start your servers in production mode. In my case, I needed to debug unicorn in production mode. I did a:
And found the pid of one of the unicorn worker process. After that: