~/talk

Spelunking in Ruby

slides:none on file

Starts at humble puts then shows concrete techniques and tools: use Ruby's -D flag to print swallowed exceptions, read $! in ensure, set Thread.abort_on_exception = true for thread errors, use bundle open and gem pristine to edit and restore gems, and run the hometowngy to get a HomeTownTrace of object instantiation. For interactive work use pry with pry-nav and pry-stack-explorer to step and inspect frames. For deep problems use gdb to attach call rb_backtrace and redirect fds (risky can segfault), use strace to spot futex waits, and try RBTrace firehose (unstable on OS X).

AI-written summary · about

  1. 0:00Spelunking in Ruby
  2. 1:33Debugging essentials
  3. 2:55Basic debugging with puts
  4. 5:24Stack traces with caller
  5. 6:47Debugging with -d flag
  6. 8:53Multi-threaded exception debugging
  7. 9:56Exploring gems with bundler
  8. 12:44Essential debugging gems
  9. 13:05Tracking object creation
  10. 14:54Interactive debugging with pry
  11. 16:40Stepping through code with pry-nav
  12. 18:04Debugging with pry-stack_explorer
  13. 20:33Debugging JRuby with VisualVM
  14. 22:37Rubinius debugging tools
  15. 24:47Debugging at C layer with GDB
  16. 33:19Tracing system calls with strace
  17. 35:48Tracing Ruby method calls
  18. 37:55Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.