Any way to run byebug under passenger + nginx?

1.7k Views Asked by At

I developed a simple rails app which works in development environment under WEBrick. However, when I move to production environment it doesn't work. I fixed trivial errors relating to assets and things. However, some things just don't work. It would be extremely helpful to be able to see what is going on interactively with debugger.

I can insert byebug in the code, and it pauses code from running, but since neither passenger nor nginx logs to STDOUT (by default) I can't get to the byebug prompt. (and neither read STDIN)

Is there a way to run byebug under passenger + nginx?

Edit

This time my issue was related to https.

2

There are 2 best solutions below

0
On BEST ANSWER

Passenger author here. Byebug integration is available in Passenger Enterprise: https://www.phusionpassenger.com/library/admin/nginx/debugging_console/ruby/

2
On

You can use https://github.com/davejamesmiller/ruby-debug-passenger This adds a rake task, just run 'rake debug' and you'll be connected to your code at the point where it hits byebug