Binding.pry in controllers with passenger
Asked Answered
A

1

6

I try use binding.pry in controller file and when i reload page, passenger stuck on it but irb doesn't work (It shows up, but stuck. It looks like passenger wrote string and thats all.). On passenger site we can read, that irb is for business plan but if we use binding.remote_pry(binding.pry ignored by rails 3), it works great. Of course binding.pry works great for WEBrick. The question is, if i'm right or it's possible to use the binding.pry with passenger but i have to write something somewhere to make it work?

Second objective of this topic is to put the link above, and this for the next beginners. I spent a lot of time to find the answer, why it doesn't work and what to do to make it work.

By the way - whether we can still somehow debugging/live debugging controllers/views? I found this but didn't try.

I use rails 4.

Akin answered 1/9, 2014 at 12:25 Comment(0)
G
7

When execution stops at binding.remote_pry in passenger, it will wait for you to connect to the debugger with the pry-remote client. From a shell on the same machine, just run:

pry-remote
Gallivant answered 1/9, 2014 at 18:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.