Ruby -rdebug: Print variable

Using ruby -rdebug, I put a breakpoint in at a line which used a bunch of other libraries.

But when I tried to output a variable using “p” the debugger said it was in a different file.

The consensus with -rdebug is that it’s pretty useless and unmaintained. Better is to use Pry.

Here’s the output I got:

debug.rb:130:in eval':undefined local variable or method query’ for #

Leave a Reply

Your email address will not be published. Required fields are marked *