Remote development
D1 supports remote development using the dashboard playground. The dashboard playground uses a browser version of Visual Studio Code, allowing you to rapidly iterate on your Worker entirely in your browser.
- Log in to the Cloudflare dashboard ↗ and select your account.
 - Go to Workers & Pages > Overview ↗.
 - Select an existing Worker.
 - Select the Settings tab.
 - Select the Variables sub-tab.
 - Scroll down to the D1 Database Bindings heading.
 - Enter a variable name, such as 
DB, and select the D1 database you wish to access from this Worker. - Select Save and deploy.
 
- On the Worker's page on the Cloudflare dashboard, select Edit Code at the top of the page.
 - Your Worker now has access to D1.
 
Use the following Worker script to verify that the Worker has access to the bound D1 database:
export default {  async fetch(request, env, ctx) {    const res = await env.DB.prepare("SELECT 1;").all();    return new Response(JSON.stringify(res, null, 2));  },};- Learn how to debug D1.
 - Understand how to access logs generated from your Worker and D1.
 
Was this helpful?
- Resources
 - API
 - New to Cloudflare?
 - Products
 - Sponsorships
 - Open Source
 
- Support
 - Help Center
 - System Status
 - Compliance
 - GDPR
 
- Company
 - cloudflare.com
 - Our team
 - Careers
 
- 2025 Cloudflare, Inc.
 - Privacy Policy
 - Terms of Use
 - Report Security Issues
 - Trademark