From: Robert Klemme Date: 2009-08-07T00:45:14+09:00 Subject: Re: Any tool for examine ruby's thread? 2009/8/6 Caleb Clausen : > On 8/6/09, femto Zheng wrote: >> Yes,I've found the Thread.list fulfills my needs,Thanks. >> do you have any means for examning every thread's stacktrace? > > There does not seem to be a way to get the backtrace of another thread > -- even from within the debugger. This is a shame, because as you say > it's useful for debugging. There ought to be a Thread#caller or > Thread#backtrace method, which works like #caller but on another > thread. > > I would have thought that you'd at least be able to use the 'thread > switch' command in the debugger, and then 'where' once you're in that > thread to see its backtrace, but that doesn't seem to work either. You can certainly cook up something with set_trace_func. This is however a bit slow. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/