Error Plugin
Import
Section titled “Import”import { createErrorPlugin } from "webotron/plugins/error";Entry Point
Section titled “Entry Point”createErrorPlugin(options)
const errorPlugin = createErrorPlugin({ target: view, pauseOnExceptions: "uncaught", onException: (ex) => console.error(ex.message),});
await errorPlugin.enable();Common Options
Section titled “Common Options”| Option | Type | Purpose |
|---|---|---|
target | ErrorEventTarget | CDP/event target to monitor. |
pauseOnExceptions | pause mode | Configure debugger pause behavior. |
onException | callback | Called for runtime exceptions. |
onConsole | callback | Called for normalized console entries. |
onWarning | callback | Called for warning-level entries. |
onError | callback | Called for error-level entries. |
What It Adds
Section titled “What It Adds”- Runtime exception tracking.
- Console/error/warning collection.
- Pause-on-exception configuration through the debugger pause modes.