Overview

The remote debugger in Tuya MiniApp IDE enables you to run a miniapp on a real device for previewing and debugging. It simulates a real operating environment as much as possible.

Prerequisites

Custom parameters

In certain cases, opening a miniapp requires initialization information. You can specify the entry page and parameters by setting the compilation parameters. You can customize the startup parameters. The miniapp gets the custom parameters through the app's onLaunch.

  • For a panel miniapp, deviceId is required for the remote debugger.
  • deviceId can also be automatically obtained and specified through the panel tools.

Device tools

When the device tool is enabled and the device is associated, the deviceId will be automatically specified.

Integrate with app

Real machine debugging has 2 modes: remote mode and LAN mode.

  • Remote mode: Use SmartLife v4.1.0 or later (v5.0 and above versions require special handling, see the tips below for details).
  • LAN mode: The IDE and SmartLife need to be on the same LAN, and the SmartLife version should be 5.18.0 or later.

Debugger

View

Hot update

After you update and save the code, the miniapp container will automatically restart to update the content.

Tips

If you debug using the SmartLife app v4.5.0 or later, choose the environment as shown below:

  • The base library must be v2.10.x or later.
  • The kits must be v3.x.x or later.
  • The TYKit version must be the same as or later than BizKit's. TYKit will no longer be maintained, so use BizKit instead.