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

Debugging & Exploring Node.js.pdf

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for A.J. A.J.
July 04, 2018

Debugging & Exploring Node.js.pdf

Avatar for A.J.

A.J.

July 04, 2018

Other Decks in Programming

Transcript

  1. Agenda • What's wrong with `console.log`? • The (perhaps not

    so) golden age of IDEs • The Inspector Protocol • Talk is cheap, let's code
  2. https://hacks.mozilla.org/2012/04/bret-victors-inventing-on-principle-and-a- few-things-it-inspired/ Bret’s big principle is that “creators need an

    immediate connection to what they create” and shows that right now in most cases this connection is broken. We write code, we compile, we load in a browser and we see the result. That is not immediate but a two steps removed way of creating.
  3. The Inspector Protocol • Node.js has a TCP-based built-in debugger

    that has been deprecated in favor of the Chromium Debugging Protocol, since version 7.7.0
  4. The Inspector Protocol • Dead simple, just spawn node.js with

    the `--inspect` flag and attach a debugger