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
You can run your test.rb
with inside lldb
. This will dump you inside an
lldb
repl. If you want to integrate this with the VSCode debugger see
[setting-up-vscode-for-mri].
lldb
against miniruby
using test.rb
usemake lldb
lldb
against ruby
using test.rb
usemake lldb-ruby
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