So you have placed a breakpoint somewhere and now want to dig around, but not even inspecting variables is working:
(rdb:3) @order_item
*** Unknown command: "@order_item". Try "help".
The reason is, you must tell the debugger to evaluate your expression. One workaround is to call irb
to open an irb session at your breakpoint. Resume by sending Ctrl+D
twice or by returning to the outer irb with "exit
" and then continuing with "c
".
However, the native debugger command for your issue is eval
(or its shorter alias e
):
(rdb:3) e @order_item
#<OrderItem id: 111471, quantity: 5, ... bla>
The debugger has a setting called autoeval
that will make it pass any unknown command to the breakpoint environment. Set it with:
set autoeval
Put that line into ~/.rdebugrc
to have your debugger always evaluate unknown commands.
Credits
Show archive.org snapshot
.
Posted by Dominik Schöler to makandra dev (2014-07-28 10:47)