RSpec Won't Stop at Breakpoint

Hi,

Yeah, running rspec won't stop at breakpoints. Breakpoints work in Rails app and custom Rake tasks though.

On Ubuntu 9.10

RubyMine 3.1 RM-103.105

Related gems:
rails (3.0.4)
rake (0.8.7)
rspec (2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
rspec-rails (2.5.0)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
ruby-debug-ide (0.4.16)

Gems are attached.

Console output:
/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /usr/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide --port 35888 -- /usr/bin/rake spec
Testing started at 1:47 PM ...
(in /home/main/workspace/reading)
Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens on 127.0.0.1:35888
/usr/bin/ruby1.8 -S bundle exec rspec ./spec/models/address_spec.rb
... The Test Output ...

Think thats all the info needed. Thanks for your time!
Steven

0
13 comments
Avatar
Permanently deleted user

Did some searching around and updated two gems to:

ruby-debug-base (0.10.5.jb2, 0.10.4)
ruby-debug-ide (0.4.17.beta3, 0.4.16)

And also got:
rcov (0.9.9.jb java)

0
Avatar
Permanently deleted user

Heh... now I notice the Rubymine UI screwing up with the debugger..... Tried fixing it. Deleted .idea on my project and ~/.Rubymine31.

0

Me too.
The debugger won't stop at a breakpoint in the spec.
This is really weird. I have got all the required gems (ruby-debug19, ruby-debug-base19) etc. in place.

-Kedar

0


Console output:
/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /usr/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide --port 35888 -- /usr/bin/rake spec
Testing started at 1:47 PM ...

According to cmdline you run spec rake task. Spec rake task is provided by RSpec gem and doesn't support integration with debugger. RubyMine launches "rake" with attached debugger and rspec rake tasks run tests in new process without debugger. Here at first we need to fix rspec-rails gem..

0
Avatar
Permanently deleted user

I'm guessing I would have to wait a while for that....

0

Hello - really love the product

Is there a workaround, e.g. a custom rake task, that would perform similar actions to rake spec, but with the debugger enabled?

It would be an exceptionally valuable feature to get rspec debugging inside the IDE functioning

Thanks in advance

0

It would be an exceptionally valuable feature to get rspec debugging inside the IDE functioning

RubyMine allows to debug rspec tasks. You just need to launch them directly using context menu without rake. More over I assume such way is more convenient because is easier to debug one rspec test of even one rspec example instead of "all" rspec tests which are provided by rspec rake task. That's why I don't consider debugging rspec tests launched using rake as high priority issue.

0
Avatar
Permanently deleted user

Could you give a step-by-step example? I'm not too familar with this...

Thanks,
Steven

0

E.g. I have a rails 3.x project and 'rspec-rails' gem file is mentioned in Gemfile.

1. At first check that rspec gems "attached" to the project:
RubyMine | File | Settings | Ruby SDK and Gems
Screen shot 2011-03-28 at 5.07.39 PM.png

2. Now launch your rspec file using context menu
rspec_debug_context_menu.png (http://devnet.jetbrains.net/servlet/JiveServlet/downloadImage/2-5298605-10208/Screen+shot+2011-03-28+at+7.05.56+PM.png)
3. If RubyMine suggests to install ruby debug gems you need to accept it.
4. Finally you will get
rspec_debugger.png (http://devnet.jetbrains.net/servlet/JiveServlet/downloadImage/2-5298605-10210/rspec_debugger.png)

0
Avatar
Permanently deleted user
0
Avatar
Permanently deleted user

Works. You're right, the fix shouldn't be a high priority. Thanks for the help!

0
Avatar
Permanently deleted user

Hi, just to clarify my reply on this thread - right clicking on a rspec test and selecting Debug still isn't working for me. Details here: http://devnet.jetbrains.net/thread/303040;jsessionid=9849831893E510BE6BFF3F694B81A5D9?tstart=0

0
Avatar
Permanently deleted user

The pictures are outdated, can you please snap shot the pictures again? 

0

Please sign in to leave a comment.