Here is what I get:
2.0.0-p0 :001 > require 'debugger'
LoadError: cannot load such file -- ruby_debug.so
I created a new Gemfile (bundle init) with this content:
gem 'debugger', github: 'ko1/debugger2'
If you try to "bundle exec irb" and 'require "debugger"', you'll get the error above. How can I test this?
@rosenfeld Did you follow https://github.com/ko1/debugger2#usage
It says drop gem 'debugger2' into your Gemfile.
This is the first thing I tried. Did you try to gem install debugger2?
gem install debugger2
There is no debugger2 gem, you have to use it with bundler
fwiw, I get the same thing, and it's failing on this line: https://github.com/zzak/debugger2/blob/master/lib/ruby-debug-base.rb#L1
I tried removing it but that results in NameError: undefined methodframe_binding' for class Debugger::Context'
NameError: undefined method
I already knew beforehand that the gem name couldn't be "debugger2". That's why I haven't even tried the instructions in README:
Anyway, your issue is different from mine. See my error message above.
They are the same issue, did you see the link I sent, where it's failing on that line? ruby_debug.so doesn't exist, because there should be no C extensions in this version of the debugger.
Ah, sorry, you're right. I'll try to comment that line and see if it works.
Commenting it out won't do, it will return NameError: undefined methodframe_binding' for class Debugger::Context'
NameError: undefined methodframe_binding' for class Debugger::Context'
I can see the error you reported now.
There is this magic line I don't understand: alias __c_frame_binding frame_binding.
alias __c_frame_binding frame_binding
Thank you for your reports.
Honestly, I don't try with install.
(1) I clone this repository
(2) rake compile
(3) use with 'ruby -I (lib dir) -I (ext dir) ...'
This is my first time to make gem.
Any advice is welcome!!
I think if you already install debugger gem, it conflicts with debugger2.
Ok, thanks, @ko1. I'll give it a try later. Today has been a tough one... :(
@zzak pointed out several issues and it may solved. Thanks!!
@rosenfeld check c63793f
Thanks @zaak and @ko1! Maybe you could publish the 'debugger2' gem to make it easier for more people to give it a try. Doing some quick experiments here everything seems to be working great!