Useful for running small changes that you want to run with your miniruby or whatever, without having to write an actual test. This is also tied into the debuggers and stuff.
Make sure that a test.rb
file exists inside your ruby
checkout directory and
then after you’ve build.
make run
- runs test.rb
with your compiled miniruby
make runruby
- runs test.rb
with your compilied ruby
make lldb
- runs test.rb
with miniruby
through the lldb
debuggermake gdb
- runs test.rb
with miniruby
through the gdb
debugger (I don’t use this)make lldb-ruby
- runs test.rb
with ruby
through the lldb
debuggerlldb
You can add RUNRUBYOPT
to any test run command (see [running-tests]). An
example:
make test-all TESTS='test/ruby/test_gc_compact.rb -n test_complex_hash_keys' RUNRUBYOPT=--debugger=lldb
Then when you get the lldb
prompt type process launch
or run
to start debugging
also see [lldb-tips] and [ruby-inspecting-structs-lldb] for information
about how to use lldb
effectively in CRuby.
There are a few options and config flags that can be used to make Ruby log a lot of output about what the VM is doing.
It looks like RUBY_DEVEL=yes
has been superceded by --enable-devel
at
configure
time. I’m not sure what this opion does properly yet.
There’s also USE_RUBY_DEBUG_LOG
which can be set in cppflags