Skip to content
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

Debuggers Support #93

Open
BryanSaxon opened this issue Apr 27, 2016 · 6 comments
Open

Debuggers Support #93

BryanSaxon opened this issue Apr 27, 2016 · 6 comments

Comments

@BryanSaxon
Copy link

I dev mostly for rails and use binding.pry for debugging. When I run into these statements with hotel, I have no way, or least do not know of a way, to continue or debug the application. It also locks hotel so you are not able to stop and restart the server. You have to run hotel stop && hotel start to get your app responding again. Obviously you can stop the hotel instance and do debugging then start back but this is a bit cumbersome and would be nice to have support within hotel itself.

@typicode
Copy link
Owner

Hi @BryanSaxon,

Thank you for raising this issue 👍
What should I install and what command(s) should I run to reproduce?

@i8ramin
Copy link

i8ramin commented May 16, 2016

This is very easy to reproduce. Spin up a fresh new rails app. Add binding.pry support

in Gemfile

group :development, :test do
  gem 'pry'
  gem 'pry-nav'
end

Add binding.pry anywhere in your code so that the code stops execution at that break-point. Hotel just hangs and it is not clear what needs to be done at that point. How can one debug their app using Hotel.

@typicode
Copy link
Owner

@i8ramin thanks for the reproducing steps.

I found this https://github.com/pry/pry/wiki/Remote-sessions you can start your server with hotel and connect remotely to it using pry-remote.

Regarding the fact that hotel hangs, it's unexpected. Do you see any error in ~/.hotel/daemon.log when it hangs?

@BryanSaxon
Copy link
Author

I tried using pry-remote and when the command is run in the terminal, it still expects execution in the hotel interface, which is read-only. When you try to turn off the server via the hotel interface, it crashes with the response:

Can't connect to server on PORT=54796. Possible causes: - Server crashed or timeout of 5000ms exceeded. - Server isn't listening on PORT environment variable.' Try to reload or check logs.

Maybe there is another hack around using pry-remote or another library I just haven't found yet. I will look into it a bit and report back if I find anything of substance.

@Nedomas
Copy link

Nedomas commented Sep 7, 2016

Having the same issue. Ideal solution would be if hotel window would allow input when logs show prompt. Would implement it if somebody showed me the way.

@zenizh
Copy link

zenizh commented Nov 15, 2016

I resolved this issue by using pry-remote and removing pry-byebug.
pry-byebug can't work together with pry-remote according to this issue, so you should remove (or pin v1.3.3) it if you are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants