debugger icon indicating copy to clipboard operation
debugger copied to clipboard

debugger terminates a Rails console when you type `n`

Open dblock opened this issue 11 years ago • 3 comments

Via https://github.com/nixme/pry-debugger/issues/55.

source 'https://rubygems.org'

ruby '2.0.0'

gem 'rails'
gem 'sqlite3'
gem 'debugger'
$ rails c
Loading development environment (Rails 4.1.4)
2.0.0-p353 :001 > n
/tmp/n-wat$ 

This deserved an animated GIF.

rails-c

It's either confusing or a bug?

The n method is defined via ExtendCommandBundle.def_extend_command "n", :Next in https://github.com/cldwalker/debugger/blob/master/lib/ruby-debug/commands/irb.rb#L22 and is implemented as

    class Next # :nodoc:
      def self.execute(conf)
        throw :IRB_EXIT, :next
      end
    end

I really don't understand the purpose of this.

dblock avatar Jul 08 '14 13:07 dblock

Thanks for reporting your issue! This is one of my 7 active issues. Use that link to check how soon your issue will be answered. Don't forget to check your issue against this project's CONTRIBUTING.md. Cheers.

cldwalker avatar Jul 08 '14 13:07 cldwalker

Nice gif! This is old behavior back from when debugger was on rubyforge, yikes. Given that debugger will soon be end-of-lifed, I won't be taking any enhancements to implement next. Feel free to close if you'd like

cldwalker avatar May 26 '15 15:05 cldwalker

Makes sense, thanks @cldwalker - will leave this open since it's still an issue, eventually the project will be lost in the Github depths.

dblock avatar May 26 '15 18:05 dblock