0

In my Gemfile I have (as per https://stackoverflow.com/a/8351945/111884)

gem 'ruby-debug19', :require => 'ruby-debug'

In my spec_helper.rb I have

require 'ruby-debug'

But when I put in debugger in my spec files, I can't seem to access any variables. I get errors like:

(rdb:1) @project
*** Unknown command: "@project".  Try "help".

I've had it work on another computer before, but I can't check on that at the moment. Any ideas?

Community
  • 1
  • 1
zlog
  • 3,316
  • 4
  • 42
  • 82

1 Answers1

3

try to type:

(rdb:1) p @project

Debugger is not irb, it works with commands. So you should type command first. p means print, then type what you want to print. To see full list of commands, just type help.

alexkv
  • 5,144
  • 2
  • 21
  • 18
  • 1
    I also found that if you run `irb` in the debugger console, you can get an irb console – zlog Jan 25 '12 at 20:29