-
Notifications
You must be signed in to change notification settings - Fork 32
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
Thread safety #2
Comments
any hints as to what it would take to make this happen? I'd really like to see it. |
@jrochkind Have you tried using pry-nav with threads? Looking through the source, I'm trying to remember why I thought it wasn't thread-safe. Of course, you can only call |
Awesome, thanks. I have not yet, but with this encouragement will try pry with pry_nav looks like it comes close to being a ruby_debug (With ruby_debug, I find that useful most especially when I want to On Thu, Feb 16, 2012 at 1:01 PM, Gopal Patel
|
@jrochkind If you're looking for something closer to ruby-debug, check out pry_debug. One goal I had for pry-nav was that the command to execute a program shouldn't change. So no binary/script to wrap a program. This is so you can start debugging a rails app or anything that autoreloads classes without restarting the process. However, there's definitely some features of pry_debug that I might be able to pull into pry-nav. Perhaps setting a breakpoint with a |
Actually, I realize that the tracer isn't thread-safe and will incorrectly count frames if there's a background thread running. The fix should be relatively easy: all instance variables in |
I might find time to create a pull request for that "all instance variables in PryNav::Tracer ned to be thread local" -- any other hints or guidance for me or anyone else who comes along and sees this? On the general debugger issue; ruby-debug has been converted to 'debugger' and now sometimes sort of kind of works on ruby 1.9.3, but i still have problems with it, and am enticed by pry's great UI and featureset. But I need threadsafety. I also need ability to set a breakpoint at the pry prompt. I agree with you that I don't want to have to change the command to execute the program, no binary/script wrapper. |
huh, actually pry_debug lets you call invoking program as normal but then
The feature set of these two pry plugins is very similar. However, yours is definitely the more popular one, with more recent commits and more faith that it'll be maintained. :) It would be ideal if they could be merged somehow, or at least if you want to borrow the most useful features from pry-debug. |
@jrochkind Not sure if pry_debug worked out for you, but check out pry-debugger, a rewrite of pry-nav using debugger as the tracer. Also includes breakpoint support. |
Thanks @nixme, i'll try to find time to give it a try. ruby-debug is increasingly sketchy, i think there are others interested in a replacement -- meaning thread-safe, and with ability to set breakpoints. |
@nixme, Oh, wait, I see pry-debugger actually uses |
You might still want to give Thread safety will come soon as |
Awesome, i'll try to keep my eye on it, and plan to dive in when multi- I have to admit I'm a bit put off by all the parts I need to combine On Jun 18, 2012, at 10:03 PM, Gopal Patel wrote:
|
I think that's because pry wasn't originally conceived of as a debugger but rather a IRB replacement. But I agree, and that's why I created the jazz_hands gem: https://github.com/nixme/jazz_hands. However it's tailored specifically for Rails apps. |
No description provided.
The text was updated successfully, but these errors were encountered: