Feature: halt in the browser debugger right before a failing assertion throws #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
When debugging (a browser debugger is attached — e.g. via
--debug-failures+--remote-debugging-port), execution should pause right before an assertion throws, so state can be inspected before the failure.Approach
Emit a
debugger;statement in theAssertionErrorpath, before throwing. It's a no-op when no debugger is attached, and halts when DevTools/CDP is attached. Possibly gate behind an option so normal runs are unaffected.Acceptance
With a debugger attached, a failing assert pauses at the throw; without one, behavior is unchanged.
Refs
PR #1 — lead's review comment.