eightbitraptor[wiki]

Debugging

Running arbitrary scripts

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.

Running a specific test and attaching lldb

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