Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Execution is paused at the breakpoint (which has a little arrow pointing at it). You can then enter commands to the rdbg prompt to control the debugger. For a list of the different commands you can use, visit the documentation for the debug gem.
Another solution is to use a different tool to drive the Procfile. The one I'm most familiar with is a tool called overmind. If you run your Procfile with overmind, you'll be able to open up a new terminal window and individually connect to any of the processes that are running. So if you want to connect to the web process to debug, you can open up a new window and run overmind connect web, and you'll have a window where you can work with the debugger's prompt.
The downside of overmind is that it requires tmux, which is a terminal multiplexer tool. If you don't already use tmux, I'd say it's probably not worth learning it just for the purposes of using overmind. But if you're like me and already know/use tmux, this can be a great solution to pursue.
In the Procfile.dev that's currently generated by the cssbundling-rails and jsbundling-rails gems, we can see that they write the web process like:
Related posts
- Metaprogramming in Ruby: It's All About the Self (2009)
- Ruby Tip – Interactive debugging without the need for gems
- Intro to Trace Inspector that displays Ruby trace logs with pretty UI
- Anyone else working through Michael Hartl's Learn Enough RoR Series that might be able to help me with a failing unit test?
- What's new in Ruby 3.2's IRB?