Mon-Ouie / pry-remote

Connect to Pry remotely
Other
639 stars 81 forks source link

WEird issue where it shows me the wrong source and doesn't catch in the pry-remote client #75

Open krainboltgreene opened 6 years ago

krainboltgreene commented 6 years ago

On server:

  def async
    binding.remote_pry
    set_user

    query = case params[:scope]
    when "selling"
      @user.products.with_sale_status(:active, :in_review, :in_review_skipped, :contact_seller, :paused)
    when "purchases"
      @user.orders.where.not(status: :pending)
    end

    if query.present?
      render :async, locals: {user: @user, records: query.page(params[:page]).per(params[:per]), scope: params[:scope]}, layout: false
    else
      head :not_found
    end

    binding.remote_pry
  end

In console:

𝑓 pry-remote --wait

What happens:

[pry-remote] Waiting for client on druby://127.0.0.1:9876
[pry-remote] Client received, starting remote session
[pry-remote] Remote session terminated
[pry-remote] Ensure stop service

From: .../pry-remote-0.1.8/lib/pry-remote.rb @ line 321 Object#remote_pry:

    319: def remote_pry(host = PryRemote::DefaultHost, port = PryRemote::DefaultPort, options = {})
    320:   PryRemote::Server.new(self, host, port, options).run
 => 321: end

(development) #<Binding:0x00007f85185f4098>:0>
krainboltgreene commented 6 years ago

It looks like as soon as it catches, the remote session client is killed and the source of remote_pry shows up.

ColinTheRobot commented 6 years ago

Running into this as well while trying to use remote_pry with foreman

sagotsky commented 5 years ago

Bump. Me too. From my POV this completely breaks pry-remote.

zreisman commented 4 years ago

Removing pry-byebug resolves this for me. Also using foreman