puma / puma-dev

A tool to manage rack apps in development with puma
BSD 3-Clause "New" or "Revised" License
1.74k stars 107 forks source link

Cannot use byebug when running in foreground #250

Closed isaac closed 4 years ago

isaac commented 4 years ago

I am trying to run puma-dev in the foreground to serve a Rails app. The app works fine except when I try to use byebug - in this case I get the following error:

stty: stdin isn't a terminal

Is anyone aware of a workaround for this issue?

I'm happy to take a shot at fixing this myself, but it would be helpful if someone could point me in the right direction.

nonrational commented 4 years ago

You'll need to use byebug's remote debugging functionality. That way, byebug listens on a port and you can connect to it without needing an interactive terminal like the one you get with rails s

https://github.com/deivid-rodriguez/byebug/blob/master/GUIDE.md#debugging-remote-programs