Closed astashov closed 11 years ago
Nice pull! You're a busy guy :)
I'm definitely open to pulling most of this in. At a first glance, I'd want to keep xml concerns out of debugger and just provide an api for a separate plugin e.g. debugger-xml. But no need to do anything until I'll reviewed the code more closely. I'll come back to this when I'm done with other outstanding issues/pulls.
Any news here? :)
Again, awesome work! Looking over this code, there seems to be a fair amount of ide-specific functionality i.e. bin/rdebug-ide, IdeProcessor, IdeInterface and the xml printer. I'd like to see all of this in a separate gem e.g. debugger-ide for two main reasons:
Of course, it will be the official way to use debugger from an ide and will be linked to from the readme. Also at some point (and assuming debugger still works on 2.0), I'd consider moving all debugger* gems to its own organization.
Changes that effect existing code e.g. Printers::Base and Printers::Plain should stay in debugger. I do realize that moving the xml printer out of debugger will require changing the way Printers loads text. I can help with that if you'd like.
All that stuff makes total sense.
I'm going to move all the IDE related stuff to debugger-ide then, but will leave Printers::Base and Printers::Plain in debugger. Regarding loading the YAML files, it should be pretty easy change, I just need to register the file with YAML during loading the plugin, or something like that.
Thanks for going through the code, appreciate that! :)
@astashov I should say here that ruby-debug-ide gem is not stale and we're not limited to fixing bugs but also add new features (such as multiprocess debug), so may be merging IDE part of debugger gem integration into ruby-debug-ide may be better idea than creating one more debugging related gem, increasing current mess of forks and branches. Feel free to ping me here or at dennis.ushakov@jetbrains.com if you need some help
@denofevil AFAIU, it is pretty hard to merge it into ruby-debug-ide, because it works in a pretty different way. Instead of reimplementing all the commands, we just define another adapter for printing output, that's it. No idea how to cleanly add that into ruby-debug-ide, especially because ruby-debug-ide is based on ruby-debug-base, which has slightly different classes structure (comparing with "debugger") and sometimes with the same classes inherited from different classes.
I actually initially tried to add debugger support to ruby-debug-ide, but realized it would be difficult and messy.
@cldwalker, check it out, I removed all XML/IDE related stuff, and left only printers support and Plain text printer. Should be good to merge.
Hey, @cldwalker, could you please have a look and merge if it is okay for you?
So awesome! Thanks! :)
Thank you :) Released 1.5.0 and mentioned debugger-xml so you may want to release ;) We can also mention vim-ruby-debugger once that uses debugger
Awesome! Yeah, will release, will try today or tomorrow evening.
This Pull Request adds XML output to 'debugger'.
So, earlier, there was ruby-debug-ide gem, which required ruby-debug, and which was used by all Ruby IDEs, like RubyMine, Netbeans, and, well, vim-ruby-debugger :). Since ruby-debug is not being developed anymore, ruby-debug-ide is stale too. That means, it is pretty difficult to debug Ruby 1.9.3 in these IDEs right now.
I decided to port ruby-debug-ide to be used with 'debugger', but then I realized that ruby-debug-ide is kinda ugly. It basically repeats all functionality and code of ruby-debug, but outputs XML, instead of plain text.
It makes sense to just add different adapters to 'debugger's output, so it can display information in plain text, in XML, in JSON, you name it. This way, we don't need to support 2 gems, we don't need to duplicate code here and there, and it is just much easier for IDE users to install just one gem, which can do everything.
So, this Pull Request adds support of different output adapters (I called them Printers), adds XML output for most commands where it makes sense, and also tries to repeat all ruby-debug-ide API, i.e. make the XML output equal to output of 'ruby-debug-ide', and also adds binary 'rdebug-ide'.
Tested with vim-ruby-debugger only, using it every day for a month already, without any bugs so far. It just works like a charm. :)