Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Debugging

Instructions for debugging Cloudflare Workers tests using Vitest by opening the inspector, customizing the port, and configuring VS Code launch settings for breakpoints.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Debugging

Instructions for debugging Cloudflare Workers tests using Vitest by opening the inspector, customizing the port, and configuring VS Code launch settings for breakpoints.

When To Use

Use when you need to attach a debugger to Workers tests, change the Vitest inspector port, or configure VS Code to support breakpoints during test execution.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-testing-vitest-integration-debugging-workflow-guide.mdA guide detailing how to debug Cloudflare Workers tests using Vitest, including opening the inspector, customizing ports, and configuring VS Code breakpoints.Questions about a guide detailing how to debug Cloudflare Workers tests using Vitest, including opening the inspector, customizing po...
examples/workers-testing-vitest-integration-debugging-cloudflare-workers-vitest-i.textA text snippet showing the specific vitest command used to enable inspection for debugging Cloudflare Workers integration.Exact payloads, commands, or snippets shown in A text snippet showing the specific vitest command used to enable inspection for debugging Cloudflare Workers integra...
examples/workers-testing-vitest-integration-debugging-cloudflare-workers-vitest-d.textA text snippet showing the specific vitest command flags required to enable inspection for debugging Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet showing the specific vitest command flags required to enable inspection for debugging Cloudflare Workers.
examples/workers-testing-vitest-integration-debugging-cloudflare-workers-vitest-i-2.textA Vitest configuration file demonstrating how to enable the inspector port for debugging Cloudflare Workers.Exact payloads, commands, or snippets shown in A Vitest configuration file demonstrating how to enable the inspector port for debugging Cloudflare Workers.
examples/workers-testing-vitest-integration-debugging-cloudflare-workers-vitest-v.textA VS Code launch configuration JSON snippet for attaching a debugger to the Workers runtime during Vitest integration testing.Exact payloads, commands, or snippets shown in A VS Code launch configuration JSON snippet for attaching a debugger to the Workers runtime during Vitest integration...

What This Skill Covers

  • This guide shows you how to debug your Workers tests with Vitest. This is available with @cloudflare/vitest-pool-workers v0.7.5 or later.
  • Main sections: Open inspector with Vitest, Customize the inspector port, Setup VS Code to use breakpoints.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/testing/vitest-integration/debugging/index.md