Mon-Ouie / pry-remote

Connect to Pry remotely
Other
639 stars 81 forks source link

No input prompt: stopped at line 191 of PryRemote::Server#teardown #58

Open drobtravels opened 10 years ago

drobtravels commented 10 years ago

I'm having a recent issue where when I connect to pry-remote, it is freezing up and not allowing any input. My web server shows it stopped at line 191 of PryRemote::Server#teardown. Prior to this, it shows the expected prompts

[pry-remote] Waiting for client on druby://127.0.0.1:9876
[pry-remote] Client received, starting remote session

and this behavior occurs after calling pry-remote in the other terminal session. The session with pry-remote does not display a prompt or any other information.

I'm using foreman, thin, rails 4.1.5 and ruby 2.1.2p95 with pry 0.10.1 and pry-remote 0.1.8.

Thanks!

Mon-Ouie commented 10 years ago

I don't really follow, what is the output of the pry-remote command?

drobtravels commented 10 years ago

Just a blank line.

Mon-Ouie commented 10 years ago

Do you have any small example that I can use to reproduce the issue?

tomtt commented 9 years ago

I get the same behaviour and in my case I was able to work out that it was due to pry-byebug not being compatible with pry-remote. Related ticket: https://github.com/deivid-rodriguez/pry-byebug/issues/33

Sometimes I get the behaviour described here, when connection with pry-remote it dumps the wrong context (PryRemote::Server#run method) in the remote process, not showing anything at all in the pry-remote command.

Sometimes pry-remote seems to work fine but as soon as a 'next' command is issued it goes straight to the identical wrong context as in the other situation.

zw963 commented 9 years ago

here is some output when use pry-byebug with pry-remote, I found the same issue with @tomtt.

[pry-remote] Waiting for client on druby://0.0.0.0:9876
[pry-remote] Client received, starting remote session
From: /home/zw963/Wanliu/payment/app/controllers/buyer_orders_controller.rb @ line 38 BuyerOrdersController#show:

    37: def show
 => 38:   binding.pry
    39:   @order = Order.find(params[:id])
    40:   @states = Order.states & self.class::STATES.map(&:to_s)
    41:   render_normal_response('show', @order)
    42: end

(pry):0> next

From: /home/zw963/Dropbox/common/ruby/gems/pry-remote.rb @ line 211 PryRemote::Server#run:

    206: def run
    207:   setup
    208: 
    209:   Pry.start(@object, @options.merge(:input => client.input_proxy, :output => client.output))
    210: ensure
 => 211:   teardown
    212: end
adibsaad commented 9 years ago

@zw963 getting this exact issue as well; same trace. any workarounds?

zw963 commented 9 years ago

@adibsaad , I address this with:

write a pry! methods, it just a wrapper method, if use pry-remote, I just use pry-nav, else will use pry-byebug.

https://github.com/zw963/ass/blob/master/common/ruby/lib/addition.rb#L162

brandur commented 8 years ago

I ran into this as well. I took a quick look through the source to see if it might be possible to tell what's going on, but nothing seems obviously broken. If anyone has any ideas around how the root problem here might be diagnosed, I'd love to hear them!

jessesanford commented 8 years ago

Also having this issue. Have tried with pry-byebug and pry-nav. Also tried @zw963 wrapper method none of those seem to work. It seems currently that pry-remote has no compatible debug gem. If anyone has a way of making pry-remote work with a next, step, continue feature in pry let me know!