debugger-xml
debugger-xml copied to clipboard
Add byebug support
Summoning @os97673 :)
I'd like to add byebug
support, it seems like the most popular debugging gem for Ruby >= 2.0. I could add it to this gem, and remove debugger
from the dependencies, and slightly rename the classes here (remove all Debugger
, rename them to DebuggerXml
, remove all ties to the debugger
gem).
Oleg, are you guys interested in supporting byebug
in RubyMine? How hard would it be for you to add another gem (e.g. byebug-xml
) to supported debugger gems in RubyMine? The API would be absolutely the same, just different gem name. Or you'd prefer to use the same debugger-xml
, and let it decide what should be used - byebug
or debugger
, depending on what gems are loaded into the app.
What do you think?
Hi @astashov :)
we do interested (new Rails add byebug to Gemfile by default (we have not found any problem yet but I'd expect to have some).
As for implementation both approach are ok for me.
BTW may I also ask you to rename rdebug-ide (our users have problems when both ruby-debug-ide and debugger-xml are installed in the same gemset)
Sure, np, what would you want me to rename it to?
Anything you like (what about rdebug-xml?)
That sounds good.
@astashov what is the status of the support? It looks like you have changed something but I'm not sure you have finished. BTW I'm unable to install debugger-xml 0.4.1 for ruby 1.9 because it tries to install byebug which requires ruby 2.0 :(
@os97673 @astashov Any news guys?
@os97673 @astashov Any news guys?
@deivid-rodriguez it is a good question :) It looks like @astashov is too busy right now, I will try to do the changes and check if everything works ok.
Sorry guys, it's not there yet. It's close though. It mostly works, but I get all these INTERNAL ERROR!!! Destination frame (0) is out of range (-1)
errors from time to time, which I don't really understand why they happen.
@astashov is the code available so I could reproduce the problem and, perhaps, help?
@os97673 The code involved should be byebug 4.0.3
+ latest debugger-xml
master, but I'm not sure how to reproduce the problem...
as far as I can see master contains no changes to make it possible to use debugger-xml from IDE (rdebug executable is not updated), so I'm not sure if all changes are there. And yes, it would be useful to know how to reproduce the problem.
Hey! Sorry for delayed answer.
So, it works on simple scripts, but sometimes fails on large projects. I tried it on our mixbook.com's site and it failed like that there, I obviously can't share the code pieces from there. :)
I'm trying to find some open source project where I could reproduce that problem.
Meanwhile, Oleg, could you please adjust rdebug-ide
executable so it works with RubyMine? I unfortunately am not really familiar with how to integrate it into RubyMine. You can use rdebug-vim changes as a reference.
Thanks!
@astashov ok, I will
@astashov There's an open issue in byebug that might be related to this: https://github.com/deivid-rodriguez/byebug/issues/127. I haven't been able to reproduce it but I'm going to add some commits that I hope will fix it. Once I do that I'll ping you so you can try it.
I think you should be able to repeat it on some large-enough Ruby project, e.g. some Rails project.
I've tried to reproduce it in my current Rails projects without luck... :(
I'll try to generate some Rails project tonight and debug it there, maybe I'll be lucky :)
Thanks!
Can you try byebug's branch issue_127
? I'm not very confident it will fix the issue, but it's worth a try.
I've just pushed changes which make it possible to start debugger-xml+byebug from RubyMine (patched for now because I've renamed executable) But thread list command doesn't work because of incorrect state (for some reason it takes control state). @astashov does the command works in vim? Also it looks like current gem can not be installed with ruby 1.9 because it requires byebug which doesn't support 1.9. So it looks like the "magic" we have in gemspec doesn't work :( Do you know a better way to specify different dependencies for different version of ruby?
Hmm, I tried it with Ruby 1.9, and it successfully installed 'debugger' gem and didn't require byebug at all. What "magic" are you referring to?
I frankly don't have threads list in Vim plugin... :blush:
Hmm, I tried it with Ruby 1.9, and it successfully installed 'debugger' gem and didn't require byebug at all. What "magic" are you referring to?
I mean - https://github.com/astashov/debugger-xml/blob/master/debugger-xml.gemspec#L21-L25 And here is the result of installing the gem (from rubygems, not from github)
Using ruby-1.9.3-p551 with gemset test $ gem install debugger-xml Fetching: byebug-4.0.3.gem (100%) ERROR: Error installing debugger-xml: byebug requires Ruby version >= 2.0.0. $ rvm current ruby-1.9.3-p551@test
I frankly don't have threads list in Vim plugin...
Well, it comes from byebug, but perhaps you do not provide interface to it
I tried to install through bundle install
though, maybe gem install
doesn't respect that thing? I'll try...
Well, it comes from byebug, but perhaps you do not provide interface to it
Yeah, exactly.
Well, it comes from byebug, but perhaps you do not provide interface to it Yeah, exactly. you are lucky ;)
I tried to install through bundle install though, maybe gem install doesn't respect that thing? I'll try...
bundler doesn't work for me :(
$ bundle install Fetching gem metadata from https://rubygems.org/..... Resolving dependencies... Installing builder 3.2.2 Installing columnize 0.9.0
Gem::InstallError: byebug requires Ruby version >= 2.0.0. An error occurred while installing byebug (4.0.3), and Bundler cannot continue. Make sure that
gem install byebug -v '4.0.3'
succeeds before bundling. $ cat Gemfile source "https://rubygems.org"gem 'debugger-xml' $ rvm current ruby-1.9.3-p551@temp
Try from master:
$ cat Gemfile
source 'https://rubygems.org'
gem 'debugger-xml', git: "[email protected]:astashov/debugger-xml.git"
$ bundle install
Fetching gem metadata from https://rubygems.org/....
Fetching [email protected]:astashov/debugger-xml.git
Installing builder 3.2.2
Installing columnize 0.9.0
Installing debugger-linecache 1.2.0
Installing debugger-ruby_core_source 1.3.8
Installing debugger 1.6.8
Using debugger-xml 0.4.1 from [email protected]:astashov/debugger-xml.git (at master)
Using bundler 1.7.3
Your bundle is complete!
It was installed into ./vendor/bundle
@os97673 Apparently you can do what you want using a C-extension: https://www.tiredpixel.com/2014/01/05/curses-conditional-ruby-gem-installation-within-a-gemspec/. But I would probably just fork the gem and add byebug
support there (or remove debugger
support and release byebug
support as a new major version).
But I would probably just fork the gem and add byebug support there (or remove debugger support and release byebug support as a new major version).
@astashov what do you think about creating byebug-xml? ;)