-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ruby-debug when running rails through foreman #58
Comments
+10 For the above concern. More on the commenting the line inside Procfile. |
I'm trying to understand how to accomplish the same thing as the author. How do you get access to a debug console when you're running your development setup with foreman? |
Same problem as author... |
I'm also having this issue when using pry's debugging. |
You should look at using remote debuggers… I had some limited success, the notion being that somewhere in an initializer for development mode you set something like the following: Debugger.wait_connection = true
Debugger.start_remote There's more documentation here - long story short, the $ rdebug -c In another terminal, this is how one has to debug when using Passenger, or some other process. I believe that if you skip the YMMV, but I think remote debugging is the way to solve this. Perhaps as an issue, if someone figures it out reliably, they could commit some documentation. (I also can't say anything about Pry, except that as far as I know it's also only a wrapper around |
Hi leehambley, That solution works very well indeed! And is some very handy knowledge to have, thank you. I didn't need to include the The only other complication I had in my setup was that I'm running guard-spork which is using drb on port 8989 as well. I used Thanks again for this info, this will come in very handy. |
@dunkstewart Can you post a wiki according to your setup so that it would be easy enough for others? |
@dunkstewart I removed the |
For anyone wanting to use pry in foreman, pry-remote seems to do the trick for me. |
Two years later, byebug also has support for remote debugging. Use |
If anyone else reads this issue, tmuxinator is a great alternative that also allows you to start multiple processes. It runs them in different tmux "panes" instead of grouping all of the output, so you are able to use a debugger. Foreman is awesome, but I would highly recommend |
If you'd like to run whatever's in your procfile as if you had pasted it into your terminal you can use Procfile
|
I have been trying out overmind and it great so far. |
Apologies, if this is a silly question, I may be grasping at straws here considering the more typical use cases for foreman.
I've recently started using foreman to manage the processes in my development environment. I'm happy with the setup, it allows me to run rails, sphinx, and delayed job together and kill them all without forgetting about one of them.
However, putting a "debugger" breakpoint in my ruby code and starting a debug console is a problem with this setup. The breakpoint does get hit because the web request hangs waiting to continue, but there is no interactive debug console on the foreman terminal.
Is it possible to get an interactive debug console while running rails through foreman in development?
I'm running rails 3.0.6, ruby 1.9.2 and foreman 0.19.0
The text was updated successfully, but these errors were encountered: