Interactions don't play nicely with debugger and spin #279

Closed
ryansch opened this Issue May 14, 2012 · 12 comments

Projects

None yet

5 participants

@ryansch
ryansch commented May 14, 2012

I'm using guard-spin to run spin serve under guard. I'm also using https://github.com/cldwalker/debugger instead of ruby-debug19. When I hit a breakpoint in my code, I find that most of my keystrokes are eaten before they're handled by the debugger. Running guard -i fixes this problem but is undesirable because I use guard for more than just spin.

I would have filed this with guard-spin (https://github.com/jonsgreen/guard-spin) but it's such a small wrapper that I doubt the bug is in there.

@thibaudgg
Member

Have you add:

platform :ruby do
  gem 'rb-readline'
end

in your Gemfile?

@netzpirat
Contributor

I think I'm going to add coolline support on the EuRuKo hackday as alternative to Readline. Then the only dependency is Ruby 1.9 on all systems.

@thibaudgg
Member

@netzpirat great news!

@ryansch
ryansch commented May 16, 2012

Adding rb-readline does indeed change things. I can use the debugger with both guard-spin and guard-rspec.

However, they both now have additional problems. When using the debugger under spin, guard runs all of my specs when I hit enter after typing a debugger command. The debugger works fine under rspec but I'm unable to run any guard interaction commands afterwards. I can type at the prompt but when I press enter I just get ^M instead.

@cdlm
cdlm commented May 19, 2012

I also get that ^M issue. My project is a Sinatra app, I use guard-{bundler,minitest,rack}.
Sometimes things work fine for a while, but eventually it starts doing that.

@thibaudgg
Member

@cdlm @ryansch I hope that coolline will solved that, in the meantime guard --no-interactions seems the only solution sadly.

@cdlm
cdlm commented May 19, 2012

yeah I'm getting the same problem with the prompt in git add --patch, so it looks like it's really a readline or iTerm2 issue…

@thibaudgg
Member

I also get that sometimes with the Terminal.app (2.2.3) so it could be a readline issue.

@netzpirat
Contributor

Sadly I wasn't able to add the coolline interactor at the hackday, but if you're on Ruby 1.9.3, then the readline bug has been fixed and you could give it a try by forcing the readline adapter without having rb-readline installed, just add interactor :readline to your Gemfile. If that works, I'll remove the warning and change the auto detection.

@netzpirat netzpirat was assigned Jun 6, 2012
@netzpirat
Contributor

Guard 1.2.0 has been released with some interactor improvements and a new Coolline based interactor (for Ruby 1.9.3 only).

You can try it by upgrading Guard and adding

gem 'coolline'

instead of rb-readline to your Gemfile.

@netzpirat
Contributor

Looks like nobody is interested in this anymore, no response for a week now. I close the issue, please re-open if you are interested in solving this.

@netzpirat netzpirat closed this Jun 27, 2012
@bobbus
bobbus commented Jan 26, 2013

I encounter this bug, with guard-spin when using binding.pry in the code to start a debug, when I arrive in pry, some keys are not working properly so I can't use it for debug.
Will try something with pry-remote but I'm definitely interesting in solving this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment