TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: pry-rescue — workflow-optimized debugging for ruby

69 pointsby cirwinover 12 years ago

10 comments

stcredzeroover 12 years ago
<i>&#62; Whenever an unhandled exception happens in your program, pry-rescue opens an interactive pry shell right at the point it was raised. Instead of glowering at a stack-trace spewed out by a dying process, you'll be engaging with your program as though it were still alive!<p>The pry console gives you access to the method that raised the exception, you can use it to inspect the values of variables (no more print statements!), the source code of methods (no more flapping around with a text editor!), and even move up and down the call stack (like a real debugger!).</i><p>Basically what we were doing in Smalltalk for decades and trying to tell people about. (To a remarkable degree of push-back and vitriol.) Many years ago, one of our community pointed out that while it lost out as a mainstream platform, Smalltalk actually won the war of ideas. (It's taking quite a long time for everyone else to catch up, however. People keep thinking they've gotten there when they're still a good 1/3rd short.)
评论 #4440195 未加载
评论 #4441009 未加载
malvimover 12 years ago
This is awesome work, thanks!<p>Just throwing this out there, I know a bit about the difficulties this would entail, but: Is it plausible to have something like this running in production mode?<p>I mean, if I had a production Rack app running and could have pry-rescue (somehow) save its state and bubble the exception up normally, and later connect to the process and inspect what went wrong. Would something like this be feasible?
评论 #4441216 未加载
picardoover 12 years ago
Thanks for this. How would I use it in Rails? Any tips for integration?
评论 #4439967 未加载
MartinMondover 12 years ago
Are there any difference to <a href="https://github.com/pry/pry-exception_explorer" rel="nofollow">https://github.com/pry/pry-exception_explorer</a> ?
评论 #4440110 未加载
评论 #4440123 未加载
koenigdavidmjover 12 years ago
Why does anyone think that multiple columns for a single story are a good idea on the web?
评论 #4440343 未加载
评论 #4440150 未加载
评论 #4440132 未加载
cmerover 12 years ago
I assume this won't work with Pow as it would require binding.remote_pry?
评论 #4441962 未加载
getriverover 12 years ago
Wow, pry and its plugins universe gets better each day.<p>If you're new to pry I recommend you check pry-remote &#38; pry-debugger.
makmanalpover 12 years ago
For python, ipython --pdb &#60;derp.py&#62; does the trick. Don't forget to install ipdb too, much nicer than plain pdb.
评论 #4441840 未加载
meedimusicover 12 years ago
is there any way to make this compatible with ruby 1.8.7? Seems like just what I need, but haven't upgraded my current app with a newer version of ruby.
评论 #4441493 未加载
teffenover 12 years ago
This is really cool. Looking forward to a rails version of the gem!