0
votes

I'm trying to debug what seems a simple issue in cucumber/rspec for RoR. Unfortunately, I can't get the debugger to work.

I have gem 'debugger' in my gemfile, and have run bundle exec cucumber

when I run bundle install, it confirms debugger is installed

Using debugger-linecache (1.2.0) 
Using debugger-ruby_core_source (1.3.5) 
Using debugger (1.6.8)

Ruby version is 1.9.3, so debugger is supposed to work. (Rails version 3.2.18)

In my paths.rb file, I have inserted "require 'debugger'", (also tried typing :require=> 'debugger' in my gemfile). I put the term debugger into the spot I want the code to stop, but the program runs the same as ever, just runs past the breakpoint. I've also tried writing breakpoint instead of debugger--that doesn't work either. Appreciate any insights people might have.

UPDATE: Found a resource that recommended adding require 'debugger' in the Cucumber env.rb file. That didn't help either.

1

1 Answers

0
votes

Found the problem. The issue I was trying to address was caused by an error in a part of the program that called the part of the program I believed the error was in. So it turns out the code was never reaching my debugger statement. That part of the program worked fine for another test that I thought was basically identical, but turns out there was an unexpected difference. So debugger is working fine.