Test on a device

Run your Lens on SPECS from Lens Studio as you build, then debug it live.

View as Markdown

Before you start

Push a Lens

From Lens Studio, send the open project to your device. You can connect to SPECS via Wi-Fi.

For step-by-step instructions, see the Lens Development docs.

Debug on device

To pause your scripts on breakpoints and inspect variables while the Lens runs on SPECS:

  1. Select Send to SPECS for Debugging. A normal send uses optimized bytecode with no debug information, so a debugger can't attach to it.
  2. Wait until the Logger shows The sent Lens has successfully started on SPECS. Attaching before then fails.
  3. Attach the JavaScript debugger from VS Code, Cursor, or another VS Code fork.

You can't reload a Lens on SPECS while the debugger stays attached. To debug code that runs when the Lens starts, such as onAwake, debug it in the Lens Studio Preview panel instead. See the Lens Development docs.

Share with testers

To get a Lens onto other people's devices without a cable, publish it to Organization only or Beta. See Release Channels.