Skip to content

Error Plugin

import { createErrorPlugin } from "webotron/plugins/error";
  • createErrorPlugin(options)
const errorPlugin = createErrorPlugin({
target: view,
pauseOnExceptions: "uncaught",
onException: (ex) => console.error(ex.message),
});
await errorPlugin.enable();
OptionTypePurpose
targetErrorEventTargetCDP/event target to monitor.
pauseOnExceptionspause modeConfigure debugger pause behavior.
onExceptioncallbackCalled for runtime exceptions.
onConsolecallbackCalled for normalized console entries.
onWarningcallbackCalled for warning-level entries.
onErrorcallbackCalled for error-level entries.
  • Runtime exception tracking.
  • Console/error/warning collection.
  • Pause-on-exception configuration through the debugger pause modes.