Aaron Fi
Aaron Fi

Reputation: 10396

In ruby, why does my IRB interactive debugging session always say "No sourcefile available"

Just trying to get my irb sessions to actually list the current line of code, and those around it. Similar to what Perl's -d debugging mode lets you ddo.

Upvotes: 1

Views: 854

Answers (2)

Adam Byrtek
Adam Byrtek

Reputation: 12202

If you are looking for a Ruby debugger you could try ruby-debug. It lets you set a breakpoint and then step through the code while displaying a context around the current instruction.

Upvotes: 1

Kent Fredric
Kent Fredric

Reputation: 57354

Its because, when you are doing it interactively, your "sourcefile" is std-in.

Upvotes: 2

Related Questions