Mon-Ouie/pry-remote — Issue #10: Subsequent requests stall
Author: Mochaleaf
Created: 2011-12-19 02:09:49+00:00
State: open

# Summary
I am having an issue when I attempt to use pry-remote on subsequent requests from the pry console. The first debugging attempt works successfully, however, subsequent requests do not work successfully.

# Relevant Gem Versions
* pry (0.9.8.0pre1 36d685f)
* pry-remote (0.1.0)
* pry-stack_explorer (0.2.7pre1 f2dd60e)
* rails (3.1.3)

# Steps to reproduce

1. Within a Rails program, add in binding.remote_pry to a controller
2. Make a web request to that controller
3. From a pry console on the rails program, execute:
```ruby
pry_remote = PryRemote::CLI.new
pry_remote.run
```
4. Note that the debugger works as expected
5. Execute `exit` to leave the debugger
6. Re-initiate the request to the same controller
7. Execute `pry_remote.run` from the same pry console, **note that you are not brought into the debugger**
8. Quit the pry console and re-open it
9. Execute:
```ruby
pry_remote = PryRemote::CLI.new
pry_remote.run
```
** Note that the debugger works again **

# Expected
I am expecting to be able to run pry_remote.run over and over to enter the debugger for the request. (or even better, after the first connection to the pry-remote, it would be nice if it just took over the pry console).