The bug wouldn't reproduce on anyone's laptop. Three of us opened the devtools simulator, tapped through the whole flow twice, and got a clean run every time. On a two-year-old Android phone the same build froze for a beat on the first screen, then asked for a permission the simulator had quietly granted weeks earlier. Same commit, same bundle. The only thing that changed was where it ran.
Here's the thing: the emulator isn't lying on purpose. It's a desktop process with a desktop CPU, permissions you already approved, and one up-to-date host runtime. A real mini-program runs inside somebody else's app, on a phone you've never held, on a host version you don't control. Performance, permission dialogs, and host version are the three gaps we keep tripping over, and they're systematic — not flukes.
Where the gap actually shows up
Start with performance. Your laptop has a fan, a plugged-in power supply, and a CPU that never thermal-throttles during a two-minute demo. A mid-range phone three years into its life does throttle, and it does it right when a mini-game has been running long enough to get warm. We've watched a screen hold a steady frame rate in the simulator and then start dropping frames once the device heated up. Nothing in the code changed; the silicon did.
Permissions are sneakier. In the simulator you grant camera or location once, usually on the first day of the project, and then you forget the grant exists. Real users deny, block the prompt for good, revoke things at the OS level, and hand you a state your code has never seen. The failure rarely looks like a crash. It's a blank map, an upload that silently does nothing, a button that goes dead because a branch assumed consent.
Then there's the host itself. Every host ships a base library, and users don't upgrade on your schedule. An API that behaves one way on the current runtime can behave differently, or not exist at all, on a version from two years back. If you only ever test against the latest, you're testing against a build that a chunk of your audience has never installed.
| Difference | In the simulator | On a real device | How to catch it early |
|---|---|---|---|
| Frame budget | Desktop CPU, no throttling | Mid-range chip slows once warm | Profile on the cheapest supported phone after ten minutes of use |
| Permission prompts | Granted once, then forgotten | Deny, permanent block, OS-level revokes | Fresh install with every permission revoked before each pass |
| Host runtime | Always the latest base library | Users sit on versions years old | Pin a minimum version and keep one device on it |
| Network | Office Wi-Fi, no packet loss | Weak signal, captive portals, mid-request drops | Throttle to a slow profile and cut the connection mid-load |
| Storage | Cleared whenever you like | Quota limits and eviction you didn't trigger | Fill the cache, then test cold start |
| Input | Exact mouse clicks | Fat fingers, edge swipes, notch cutouts | Hand the phone to someone who hasn't seen the design |
What a real debugging matrix costs
We're not going to pretend the answer is just test on real devices. A matrix covering five hosts, three OS versions, and a handful of cheap phones is expensive to buy and tedious to keep charged, updated, and logged into real accounts. Cloud device farms help, but they aren't the same as a phone on a shaky connection in someone's hand, and the bill climbs with every combination you add.
Automation has a ceiling too. You can script taps and screenshots, but you can't easily script the OS permission toggle, a host app updating itself overnight, or a notification landing mid-flow. Our automated suite covers the happy path well and the weird states badly — which is exactly backwards from where mini-program bugs live. We've learned to read a green pipeline as a signal that the obvious stuff is fine, not that the thing works.
And some problems don't exist until real traffic hits them. A host rollout, a regional network quirk, a device we didn't stock — those arrive through staged releases and support tickets, not from a lab. That's uncomfortable, because it means you can't buy certainty with more hardware. You can only shorten the distance between shipping something and noticing it broke.
Ship small, then watch
So we stopped trying to make the simulator honest and started treating it as what it is: a fast place to check logic, not a place to sign off. Sign-off happens on a small matrix we actually maintain — one old phone per host, one device pinned to the minimum base library, one handset we keep deliberately warm and cluttered. Everything else goes out as a staged release to a slice of real users, with permission-denial and cold-start paths instrumented before the wider rollout.
That order matters more than the tooling. Catch logic bugs where iteration is cheap, catch device bugs on a few real phones, and accept that the last category only shows up in production. The teams that get hurt aren't the ones with a modest device lab; they're the ones who believed a clean simulator run meant they were done.
Sources
- WeChat Mini Program framework docs — where the simulator, remote debugging and base-library versioning are actually described.
- Alipay Mini Program developer docs — a second IDE with its own preview flow, which is where the differences start.
- Chrome DevTools documentation — remote inspection and performance panels worth borrowing for on-device measurement.
- Taro documentation — how one codebase compiles into per-host builds and conditional branches.