↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

UsingTheJRubyDebugger

The page explains that JRuby has a Java-based implementation of the fast Ruby debugger rdebug. It says newer JRuby versions, especially 1.5, already bundle the gem, while JRuby 1.6 can install it directly with gem install ruby-debug.

For older JRuby versions, it lists a manual setup using ruby-debug-base, ruby-debug, ruby-debug-ide for IDE use, and columnize. It also shows how to start debugging a Rails app or a local Ruby script, and warns that the –debug option only works from JRuby 1.1.3 onward.

Reading notes
#

  • JRuby has a Java-based implementation of the fast Ruby debugger rdebug.
  • JRuby 1.5 already includes the gem pre-bundled.
  • JRuby 1.6 can install ruby-debug with jruby -S gem install ruby-debug.
  • Older JRuby versions need manual installation of ruby-debug-base-0.10.3.2-java.gem.
  • ruby-debug and ruby-debug-ide are installed with –ignore-dependencies in the older setup.
  • columnize must also be installed unless it is already present.
  • The –debug option works only with JRuby 1.1.3 and later.
  • For older JRuby versions, the page says to use -J-Djruby.reflection=true and -J-Djruby.compile.mode=OFF instead of –debug.
  • A Rails app can be started under the debugger with jruby –debug -S rdebug script/server.
  • A local Ruby program can be started with ruby –debug -S rdebug -Ilib rubyprogram.rb.
  • The debugger can also be invoked programmatically with require ‘ruby-debug’ and debugger.