Skip to article
Documentation

Local development

Inspect Wrangler-backed data while developing a Worker.

On this page

Prepare the project#

Open a Worker project with a Wrangler configuration and install its dependencies. Use the same Wrangler version and configuration file as the project’s normal development workflow. Supported configuration formats include TOML, JSON, and JSONC.

Define bindings such as D1, KV, and R2 in Wrangler and use the matching binding names in Worker code. Start the project’s local Wrangler development command so the local runtime and persistence are initialized.

Open Local Dev#

In Toolkit for Cloudflare, inspect Local Dev discovery for the project. Select the configuration and supported local resource. Check its displayed context before reading or changing values.

For a local D1 database, inspect tables or run a read query. For local KV or R2, write a test entry through your application and verify it appears in the corresponding browser. This checks that the IDE and the application are looking at the same local state.

Diagnose mismatches#

Compare working directory, selected configuration, environment, and local persistence location. A resource name matching production does not mean it uses production data. If the application sees a value the IDE does not, identify which Wrangler process and state directory each is using before recreating bindings.

The Local Dev view also discovers supported Workflows and Container declarations and can open their configuration. Run and validate those services through the project’s normal Wrangler workflow.

Manual for version 2026.2.7 · Reviewed