TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Using GDB to inspect a running Ruby process

46 点作者 sdqali大约 12 年前

2 条评论

garysweaver大约 12 年前
A few other helpful tools are:<p><pre><code> require 'tracer'; Tracer.on </code></pre> That works a lot, but in some cases it can get caught in a loop where it doesn't print the trace. When that happens, or if I want to just see method calls, etc. I'll use a tool I wrote called autolog:<p><pre><code> gem install autolog </code></pre> Then in the code:<p><pre><code> autolog do # some code end </code></pre> Autolog is basically a quick and hopefully more intuitive way of using Ruby's set_trace_func. If all of those don't work, I've listed a few other options in the README that others have mentioned: <a href="https://github.com/garysweaver/autolog" rel="nofollow">https://github.com/garysweaver/autolog</a>
IsTom大约 12 年前
And you better know that. Once I had to do this and comment out a "winsocks workaround" in RTS because it would hang ruby process from time to time. 100% core use per process is bad for production systems.
评论 #5506809 未加载