Injecting a custom console.log and error handler. Displaying logs and errors in the DevTools panel. Setting breakpoints automatically when errors occur. Inspecting variables and call stack in the DevTools panel. Toggling the debugger on and off from the popup.