cldwalker / debugger

port of ruby-debug that works on 1.9.2 and 1.9.3
BSD 2-Clause "Simplified" License
845 stars 80 forks source link

debugger terminates a Rails console when you type `n` #133

Open dblock opened 10 years ago

dblock commented 10 years ago

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.

cldwalker commented 10 years ago

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 commented 9 years ago

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

dblock commented 9 years ago

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