Add mspec debugging support for ruby
Reported by Marius Nuennerich | April 6th, 2008 @ 12:44 PM | in 1.0 preview
brixen in IRC said it only works for rbx, so please add normal ruby support :)
Comments and changes to this ticket
-
Brian Ford April 19th, 2008 @ 10:51 PM
- → State changed from new to resolved
The DebugAction in MSpec uses Kernel.debugger provided by the Rubinius debugger. A similar facility is not readily available in MRI. However there are a couple workarounds:
bin/mspec -tr -T "-rdebug" spec/ruby/1.8/core/numeric/quo_spec.rbwill start the MRI debugger at the beginning. You can then set a breakpoint at a line in that spec file.
Another option is to set a breakpoint at mspec/runner/actions/debug.rb:5 and step into the spec if the condition evaluates to true.
It seems a low priority to be able to debug a spec in MRI since the specs are being written to describe already implemented behavior, while in Rubinius and other implementations, a debugger could be useful in trying to figure out why a spec fails.
I'll accept a patch for a more integrated MRI solution that does not adversely alter how DebugAction presently works, but it's too low priority for me to work on this myself.
Closing this ticket for now. Please reopen if you have a patch for this facility.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
