Repository navigation
v0.18.0
bdg v0.18.0
bdg can now attach to the Chrome you already have open (bdg attach), without reloading your tab. Action results are more honest about what happened (form submits, silent DOM changes, blocked submits, tracker noise removed), Ctrl-C now ends every command with a clear envelope or line, and the release workflow is hardened so no project code runs where the npm token exists.
Highlights
bdg attach [tab]: list and attach to tabs of your running Chrome (enablechrome://inspect/#remote-debugging, or use--chrome-ws-url/--user-data-dir). Earlier console messages and exceptions are replayed; the page is not reloaded.network list --filter url:<text>: filter by part of the URL as shown, with!url:and*;domain:<host>:<port>now compares the port.- Honest action results:
Form submitted,Button changed,Activated,Expanded,DOM changed (N nodes),Focus moved to, andShown:through shadow roots andaria-expandedreveals; repeated beacons share one row; tracker errors are hidden. - Ctrl-C everywhere: every interrupted command prints an
Interruptedenvelope (--json) or one line,dom evalandbdg cdp Runtime.evaluatestop their script on the page, and the next command answers at once. statusandpeekshow a page that is still loading, with what it waits on;peek --jsontimestampis the snapshot time.- Safer big results:
dom eval --fullandbdg cdprefuse over-large results with exit 81 instead of running out of memory, and a frozen Chrome ends the session with a clear reason. - Secrets stay hidden in start errors (no URL credentials or tokens).
- Release workflow hardening: build and publish are separate jobs, actions are pinned to commit SHAs, and there is a dry-run input.
Breaking changes
- Bare
bdg --jsonandbdg <group> --json(bdg page --json,dom,network,state,css) return an error envelope and exit 81 instead of help with exit 0. Runbdg --help --jsonfor the help document. - Help JSON
optionsis an array everywhere ({flags, description, required, takesValue, optional}); the compact root help used a map. Read it as an array. - Page-code failures during an action exit 91, not 110 (
dom pressKeyon a page that replaced built-ins exits 90). Match 91 (and 90). --chrome-ws-url: a declined "Allow remote debugging?" prompt exits 82 and an unanswered one 102 after 30 s, with one connection attempt (was two, 5 s handshake timeout). Handle 82 and 102 where you start with--chrome-ws-url.- A
--filterwith an odd number of"exits 81. Close the quote, or write"url:a b". dom screenshot --followexits 130 / 143 on Ctrl-C / SIGTERM (was 0 / killed).dom evalno longer leaves top-levelconst,letorclasson the page. Usewindow.x = …to share state between evals.
Install
npm install -g browser-debugger-cli
Full changelog: https://github.com/szymdzum/browser-debugger-cli/blob/main/CHANGELOG.md
Compare: v0.17.0...v0.18.0