-
Notifications
You must be signed in to change notification settings - Fork 80
officially support ruby 2.X #47
Comments
An example of failing to install in #66 |
You might want to look at https://github.com/denofevil/debase. It's pretty minimal implementation of ruby-debug-base for 2.0 that ruby-debug-ide (used by RubyMine) gem is using to debug 2.0.0. Only methods used by ruby-debug-ide are currently implemented, but it's open for pull requests. |
This might be helpful: http://www.ruby-forum.com/topic/4407089 tl;dr: the new TracePoint functionality should be used: http://www.ruby-doc.org/core-2.0/TracePoint.html I wonder if this would make it possible to write a debugger without having to compile anything. I'll investigate. |
@bcardarella it it possible to write a debugger without having to compile anything. The problem is that this debugger will be slow as hell. I've implemented debase in pure ruby for the beginning, then I ran test suite from depot project measuring execution time. Here are results from my experiments:
Times are in seconds, none represents normal run of the tests without any debugger at all. |
@denofevil, isn't the reason |
@banister, part of ruby-debug is mostly true, but remember that this event hook is executed on every ruby event. This means that it's executed multiple times per one line. I've tried running pure ruby implementation with JRuby and got quite good results (very close to ruby-debug-base-java), but for MRI it was still slow. I've done benchmarking on 2.0.0-preview2, may be performance is better with final. BTW rb_tracearg_binding is creating new binding. We can try reverting to ruby-debug/debase@1b3f8a2 and replacing set_trace_func with TracePoint to check if it's fast enough |
+1 |
1 similar comment
+1 |
For the love of god, please stop with the endless +1 s it's the most retarded meme ever to infect github! |
banister sorry - it's nothing more than a bump and a subscription to the issues - I found that github's thread watch function is not the most reliable thing in the world - doesn't always shoot an email to me unless I'm subscribed to an issue, didn't mean to irritate anyone. |
I am change something to compatible ruby 2.0.0-p0. https://github.com/windwiny/debugger |
^ What he means is that he may have fixed it so that debugger now works for Ruby 2.0.0-p0. |
I can confirm that windwiny's patch seems to make it work on Ruby 2.0.0 |
Awesome, good job windwiny.Could we get this PR'd and pushed up to rubygems? |
@windwiny I think you should create a real Pull Request |
Can I also suggest a major version bump of the gem so it is clear this is On Friday, March 1, 2013, Edwardzyc wrote:
Brian Cardarella |
@bcardarella afaict he's using |
same as Issue #67 problem |
+1 |
+1 and thanks for all of your hard work in general. If writing a poem would help move things along, lemme know and I'll bust out a haiku. |
Would love a poem :) Though I'm not helping... On Tue, Mar 5, 2013 at 1:06 PM, Jonathan E. Magen
|
I've released 1.4.0 which merges #68 to partially support 2.0.0. I will not consider 2.0.0 support official until tests can run. I've updated this card's description |
How to install this version? |
rubygems.org took some time to update but now |
+1
error, and Rails crashes and quits. I don't know why, maybe it's a Rails related issue. Any ideas? |
Nono, it's a debugger issue. That's why @cldwalker talked about "partial support" when he released this version. |
The Komodo debugger has no problem distinguishing step from next, so it's more likely the client code than this library. I didn't test the new version of rdebug though. |
I don't understand. What client library? On Wed, Apr 10, 2013 at 1:21 PM, ericpromislow notifications@github.com
|
By "client code", I meant the code that loads this library. It could be bin/rdebug right here, or any other debugger that uses this code to get at ruby_debug.so |
koichi's fork handles exception handlers correctly, but it returns an empty hash for context_frame_locals, and seg faults elsewhere (I haven't narrowed down where). The main difference is that koichi's code maintains a list of inspected frames, which seems to avoid the reason for the crash I see in exception handlers, where we loop through control frames that contain apparent garbage. |
Could someone provide a test case or a simple program for the next/step issue you are having? I would like to try it against my fork because I'm not experiencing the issue and my tests are passing. Thanks. |
I'm back to using cldwalker's ruby_debug.so, and given that I can do some things in Ruby in 2.0 that I couldn't do in 1.x, like Thread#backtrace_locations, I no longer need to call context_frame_line, and therefore no longer have that dependency on rb_vm_get_sourceline. |
@deivid-rodriguez I am running Ruby 2.0.0-p0 via RVM on latest Mac OS X Lion, and tried to reproduce this bug via a simple Ruby script, but was unable to do so. So @ericpromislow might have a point about it being the client library. For me, |
I can reproduce it with a vanilla app:
change file to:
then
uncomment:
then
|
Let's cut out the rails stuff:
#/tmp rdebug debug_test.rb
|
byebug looks like a win for me. Swapping debugger out until this is fixed. On the downside, it looks like Pry depends on/uses debugger, because it remains affected. |
@kwerle I would like to help with that issue but this is getting a bit off-topic, so you can open an issue at byebug and we can discuss it there if you wish. Salute. |
+1 |
Confirmed that next does not work with ruby 2. Using byebug, it's working like a charm. When the patch for debugger? |
Confirmed as well for me: 'next' does not work with ruby 2, performs a 'step'. Using byebug, it's working like a charm. But wishing for the canonical debugger to return ? |
+1 |
+1 |
debugger doesn't work properly in ruby 2.0 cldwalker/debugger#47
Closing since I'm scoping debugger to just 1.9.2 and 1.9.3. For more see #125 (comment) |
I do not forsee spending anytime on this in the near future. Any pull requests to help make this happen would be greatly appreciated by the ruby community.
#68 gets 2.0.0 partially working but the test suite does not work. I will not consider 2.0.0 officially supported or close this ticket until tests are passing. Here is what I see when I run tests:
Also, a bug ticket on debuggers and ruby 2.0, https://bugs.ruby-lang.org/issues/7214, from #44
The text was updated successfully, but these errors were encountered: