Choose what to capture — uncaught errors, failed script/style/image loads, promise rejections, console.error and optionally console.log — and where to show it. Paste the generated script as the first element in your <head>, rebuild, and errors appear in an overlay on the phone.
Where to put it
As the first thing inside <head>, before any other script or stylesheet — errors that happen before it loads cannot be caught, and the failed-load listener must be registered before the files are requested.
Reading the output
| Prefix | Means |
|---|---|
[load] | A file failed to load — wrong path, wrong case, missing from the ZIP, or a CDN offline |
[error] | An uncaught exception, with file and line |
[promise] | A rejected promise nobody handled — often a failed fetch |
[error]/[warn] from console | Messages your code or libraries logged |
The on-phone debugging guide has a triage table for blank screens. Remove the snippet — or keep the five-tap gate — before you publish.
Frequently asked questions
Does it slow the app down?
No measurable amount. It only does work when something is logged.
Why not use chrome://inspect?
Remote debugging works only when the app enables it, which release builds normally do not. This works in any build.