-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
watchr doesn't handle ruby-debug well? #34
Comments
Seems to work fine for me. Here's a simplified watchr file we use: def run(file)
if File.exist?(file)
puts("Running #{file}")
system("rspec #{file}")
else
$stderr.puts "Could not find #{file}"
end
end
watch("^lib/(.*)\.rb") { |m| run("spec/lib/#{m[1]}_spec.rb") } As long as we have ruby-debug loaded up correctly, everything works as expected. We're using watchr 0.7. |
So, rspec breaks out into debug as you would expect in the watchr terminal? What does 'set it up right' entail? Sent from my iPhone On Oct 4, 2011, at 19:01, Alex [email protected] wrote:
|
Yep.
I just mean to make sure to require 'ruby-debug' somewhere either in the spec file or in spec_helper. What problems are you having with it? |
I had a problem with using ruby debugger and it was related to this script: https://gist.github.com/276317. There are variations of this one floating around, but the way it executes the commands won't allow you to drop into a debugger. I changed the run() method to system() and it works great. Do you all have a recommended watchr script that emulates the functionality of autotest? That may be worth having an official copy! |
what's the right way to handle going into debugger with watchr? is there anything that could be written up to make this clearer?
The text was updated successfully, but these errors were encountered: