Skip to content

v0.19.0

Choose a tag to compare

@szymdzum szymdzum released this 16 Oct 21:13
· 156 commits to main since this release
848e965

bdg 0.19.0 makes interrupting a slow start reliable and fixes HAR body sizes. Action results get better at telling what you changed from what the page changes on its own.

Behaviour changes (no breaking changes)

  • A start you interrupt now force-kills its Chrome after 500 ms (#804, #801). This applies to Ctrl-C, SIGTERM or bdg stop while bdg <url> is still starting. bdg sends Browser.close, waits up to 500 ms, then kills Chrome's process group (SIGKILL). The command returns in well under a second (exit 130 or 143) and leaves no session.
    • A cancelled start may lose profile data Chrome had not written yet, mostly cookies restored with --state.
    • With --user-data-dir pointing at a real profile, Chrome may show its "didn't shut down correctly" restore prompt the next time it starts.
    • A normal bdg stop, the end of a session, and a crash or lost connection keep the graceful shutdown. bdg attach / --chrome-ws-url sessions never kill your Chrome.
  • HAR response.bodySize no longer counts the headers (#803, #796). It is the received body (content encoding kept), so headersSize + bodySize no longer counts the headers twice.
    • bdg uses Chrome's encodedBodyLength when Chrome sends it. Otherwise it computes encodedDataLength − headersSize, never below 0; Chrome 155 does not send encodedBodyLength yet.
    • A 304 or a cache hit gives 0, and an unknown size gives -1, as HAR 1.2 allows.
    • What to do: tools that compared bodySize with transfer sizes should use headersSize + bodySize, or the network list size column, which is unchanged.

Highlights

  • Ctrl-C right after the navigation was sent ends the start at once. Before, bdg waited for the page's first response plus 3 s and printed "still shutting down" (#801).
  • Also changing: row. A ticker, a polled badge or a timer-driven list the page updates by itself is reported there (alsoChanging in --json), instead of under New text:. It also no longer marks a finished action "still changing" (#782).
  • Dialogs a click opens are listed under Shown: (#798). New text: after a navigation skips footer headings (#799).
  • A dom wait timeout names the requests a loading page waits on (pending, pendingCount) (#784).
  • Human output matches the data: escaped attribute values, same-origin links shown as paths, icon-only buttons named, invalid field state (#772). Also a quoted-argument hint for extra words (#783) and a clearer Errors: row when only trackers logged errors (#785).
  • dom form lists type=image submit buttons and associates labels correctly. details network explains a multipart body it couldn't capture. Text filters ignore content that isn't rendered (#800).
  • Performance recipes in the CLI reference: LCP, CLS, long tasks, CPU profile (#800). Commands start 8–10 ms faster after the first run (#794).

Full list in CHANGELOG.md.

Install

npm install -g browser-debugger-cli

Compare: v0.18.0...v0.19.0