-
Notifications
You must be signed in to change notification settings - Fork 10k
Changelog: Chrome devtools x Vite plugin #22606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/content/changelog/workers/2025-05-21-vite-plugin-chrome-devtools.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| title: Debug, profile, and view logs for your Worker in Chrome Devtools — now supported in the Cloudflare Vite plugin | ||
| description: The Cloudflare Vite plugin now supports debugging Cloudflare Workers using Chrome Devtools | ||
| products: | ||
| - workers | ||
| date: 2025-05-21T13:00:00Z | ||
| --- | ||
|
|
||
| import { Render, PackageManagers, TypeScriptExample } from "~/components"; | ||
|
|
||
| You can now [debug, profile, view logs, and analyze memory usage for your Worker](https://developers.cloudflare.com/workers/observability/dev-tools/) using [Chrome Devtools](https://developer.chrome.com/docs/devtools) when your Worker runs locally using the [Cloudflare Vite plugin](https://developers.cloudflare.com/workers/vite-plugin/). | ||
|
|
||
| Previously, this was only possible if your Worker ran locally using the [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/), and now you can do all the same things if your Worker uses [Vite](https://vite.dev/). | ||
|
|
||
| When you run `vite`, you'll now see a debug URL in your console: | ||
|
|
||
| ``` | ||
| VITE v6.3.5 ready in 461 ms | ||
|
|
||
| ➜ Local: http://localhost:5173/ | ||
| ➜ Network: use --host to expose | ||
| ➜ Debug: http://localhost:5173/__debug | ||
| ➜ press h + enter to show help | ||
| ``` | ||
|
|
||
| Open the URL in Chrome, and an instance of Chrome Devtools will open and connect to your Worker running locally. You can use this to: | ||
irvinebroque marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - View logs directly in the console | ||
irvinebroque marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - [Debug code by setting breakpoints](/workers/observability/dev-tools/breakpoints/) | ||
| - [Profile CPU usage](/workers/observability/dev-tools/cpu-usage/) | ||
| - [Observe memory usage and debug memory leaks](/workers/observability/dev-tools/memory-usage/) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.