liveBook · Manning

Browser developer tools

As explained in JavaScript in Depth

A set of browser developer tools for inspecting, debugging, profiling, and analyzing JavaScript applications.

Browser developer tools provide interactive diagnostics for JavaScript applications, exposing heap snapshots, allocation timelines, CPU profiles, and memory graphs. They are built into browser development and can also analyze diagnostic files captured offline. section 11.1.3

Connect runtime environments according to where the code executes:

  • Open the browser developer tools menu or press F12; no setup is required. section 11.1.3
  • Start Node.js with --inspect, open chrome://inspect, and select the remote target. section 11.1.3
  • Use --inspect-brk to pause at the first line before startup behavior occurs. section 11.1.3
  • Expect similar V8 diagnostics in Deno, potentially different data in Bun, and limited connection support for Cloudflare Workers. section 11.1.3

Attach before startup

Run node --inspect-brk server.js, open chrome://inspect, and inspect the process before its first line executes. Load .cpuprofile or .heapsnapshot files later when live attachment is impractical. section 11.1.3

Figure 11.7 The Chrome/Edge DevTools Performance Tab provides detailed CPU and wall-time profiling of where your application is spending time.

Use the Performance tab to examine CPU and wall-time profiles and locate where an application spends time. section 11.1.3

How JavaScript in Depth covers it

How deep it goes
Connects runtimes and names profiling artifacts, but does not detail diagnostic interpretation or panel procedures.
Examples
Uses F12, node --inspect, node --inspect-brk, chrome://inspect, .cpuprofile files, and .heapsnapshot files.
What it assumes
Assumes a browser or supported JavaScript runtime and teaches connection setup for Node.js, Deno, and Bun.
What you can do after
Diagnose JavaScript behavior with browser tools, remote runtime inspection, profiles, heap snapshots, and memory graphs.
How it connects
Connects heap snapshots, allocation timelines, CPU profiles, memory graphs, and the Inspector Protocol.

Also explained in

Compare how 5 books explain browser developer tools →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of JavaScript in Depth. The section links point to the parts of the book it draws on.