This guide describes the methods for debugging miniapps during development.
In VS Code
-
Click Preview Miniapp in the plugin sidebar. Choose whether to auto-run
npm start
.-
Yes: Manually input your MiniApp preview URL.
-
No: The plugin will run your start script and show the preview input afterward.
-
-
Paste your MiniApp URL in the top input field..
-
The preview will appear inside VS Code..
-
To debug, run Developer: Toggle Developer Tools from the command palette..
On Android Simulator
-
Click Preview Miniapp in Android Emulator..
-
Enter the preview URL in the field that appears..
-
Open Chrome → go to
chrome://inspect/#devices
→ find the WebView and click Inspect..
On IOS Simulator
-
In Safari: Enable Develop menu in Preferences > Advanced.
-
Click Preview Miniapp in iOS Emulator, then select a simulator.
-
Enter the MiniApp preview URL.
-
In Safari: Go to Develop > Simulator, then click the WebView to inspect it.
-
Click the WebView object that you want to inspect, and then debug the miniapp in Web Inspector.