Troubleshoot FLEDGE

Troubleshoot worklets and observe FLEDGE events.

Published on

From Chrome Canary 98.0.4718.0, it's possible to debug FLEDGE and FLEDGE worklets in Chrome DevTools.

Read the developer guide for the full life cycle of FLEDGE. Not a developer? Refer to the FLEDGE API overview.

FLEDGE worklets

The first step is to set breakpoints via a new category in the Event Listener Breakpoints pane in the Sources panel.

DevTools in Chrome Canary, highlighting the Event Listener Breakpoints pane in the Sources panel. The Bidder Bidding Phase Start is selected under ad auction worklet.

When a breakpoint triggers, execution is paused before the first statement at the top-level of the worklet script. You can use regular breakpoints or step commands to get to the bidding/scoring/reporting function itself.

Live worklet scripts will also show up under the Threads panel.

Screenshot of DevTools in Chrome Canary, highlighting the Threads pane in the Sources panel, showing the current worklet script that has been paused.

Since some worklets may run in parallel, multiple threads may end up in the "paused" state. You can use the thread list to switch between threads, and resume or inspect them more closely as appropriate.

Observe events

From the Application panel in Chrome DevTools, you can observe FLEDGE interest group and auction events.

If you visit the FLEDGE demo shopping site in a browser with FLEDGE enabled, DevTools will display information about the join event.

The DevTools Application panel displaying information about a FLEDGE interest group join event.

Now, if you visit the FLEDGE demo publisher site in a browser with FLEDGE enabled, DevTools displays information about the bid and win events.

The DevTools Application panel in Chrome Canary, showing information about FLEDGE auction bid and win events.

You'll need to refresh the page to see FLEDGE events if DevTools wasn't open when you navigated to the site.

All FLEDGE API references

API reference guides are available:

The FLEDGE API explainer also provides detail about feature support and constraints.

What's next?

We want to engage in conversations with you to ensure we build an API that works for everyone.

Discuss the API

Like other Privacy Sandbox proposals, this API is documented and discussed publicly.

Experiment with the API

You can experiment and participate in conversation about the FLEDGE API.

Updated on Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.