Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Using GDB to inspect a running Ruby process (thoughtbot.com)
46 points by sdqali on April 7, 2013 | hide | past | favorite | 4 comments


A few other helpful tools are:

  require 'tracer'; Tracer.on
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:

  gem install autolog
Then in the code:

  autolog do
    # some code
  end
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: https://github.com/garysweaver/autolog


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.


RTS = realtime strategy? Sorry I'm not up with the latest acronyms.


Runtime system.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: