ruby-on-railsruby-on-rails-4rack-powbyebug

How to use Byebug with a remote process (e.g., pow)


How do I connect to a remote debugging instance of Byebug (for use with Pow, etc)?


Solution

  • In your code

    remote_byebug
    

    Invoke your code (e.g., by refreshing the page). This will spin up a local byebug server on port 8989. Your code will then 'hang' waiting for a client connection.

    Connect to it via the terminal:

    byebug -R localhost:8989
    

    Manually configuring the server is no longer necessary as of https://github.com/deivid-rodriguez/byebug/pull/406/files