Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Debugging JavaScript, Ruby, Elixir

exAspArk
November 21, 2018

Debugging JavaScript, Ruby, Elixir

# JavaScript
* alert
* console.log
* console.time
* console.trace
* console.table
* Pretty print
* debugger
* Interactive breakpoints
* iframes
* React, Apollo, Redux, BrowserStack extensions
* Debuggin iOS, Android
# Ruby
* I am a puts debugger
* caller
* source_location
* freeze
* backtrace
* Logger
* REPL
* pry: cd, ls, whereami, wtf?, show-source
* Dotfiles
* Mute output
* Reload rails console
* Override in runtime
* Bundler open, show gem
* Gem pristine
* Checkups: Sentry, Slack, email
* sshrc
* ps, top, strace
* rbtrace, rbspy, stackprof
# Elixir
* IEx: i, h
* Connect nodes
* Distillery remote_console
* IO.inspect and pipe operator
* IEx.pry
* Debugger
* Observer

exAspArk

November 21, 2018
Tweet

More Decks by exAspArk

Other Decks in Programming

Transcript

  1. Learn DevTools (Chromium) • Shortcuts • Network tab • Event

    listeners • Storage • Performance • Service Workers • etc.
  2. REPL https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop Read-Eval-Print-Loop is a simple, interactive computer programming environment

    that takes single user inputs, evaluates them, and returns the result to the user. REPL involves the programmer more frequently than the classic edit- compile-run-debug cycle.
  3. Debugging in production If something weird is happening, consider collecting

    more information about frequency and context: • Report to your error tracker (Sentry) • Notify in your messenger (Slack) • Send an email • etc.
  4. IEx