cldwalker/debugger — pull request #59 by astashov (2013-01-28 18:47:01+00:00)
Title: XML output support

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. :)