I have been able to extract the YARV bytecode list of instructions from a "compiled" ruby file using RubyVM::InstructionSequence#disassemble
.
Now I would like to debug the code instruction by instruction.
Is there any debugger that let me do that?
Regards
I don't know of any Ruby level debuggers that will allow instruction by instruction debugging. However, as Ruby is written in C, you could use GDB.
The core interpreter loop which processes those instructions is implemented in
vm_exec_core
. The bodies of the instructions are stored ininsns.def
, and processed into C code, stored invm.inc
.