The Mini Program Integrated Development Environment (IDE) supports previewing and debugging on a real device. You can preview the output of your code or debug it on a mobile client.
Procedure
Click Preview or Debug in the upper-right corner of the IDE.
The IDE generates a
.zippackage from the current code and uploads it to the console.The console automatically creates a publishing task, generates a QR code, and returns the QR code to the IDE.
NoteIf a whitelist is not set, the build may fail and a QR code cannot be generated. To resolve this issue, set a whitelist.
Use a mobile client's QR code scanner to scan the QR code displayed in the IDE.
Scanning the code triggers the console to send the Mini Program package.
The QR code is valid for 15 minutes. After it expires, a refresh button appears.
After the mobile client receives the Mini Program package, you can view the preview or debug interface on your device.
Set up preview and debug on a real device
See the following documents to learn how to set up real-device preview and debug for Android and iOS Mini Programs: