Skip to content

feat(dev): inspector-proxy and worker logging improvements #532

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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Mkassabov
Copy link
Collaborator

@Mkassabov Mkassabov commented Jul 2, 2025

What this does

  • creates an inspector-proxy that can be used to wrap a chrome devtools server instance
    • adds support for multiple clients connecting to the same time
    • logs are streamed to a file (if option enabled)
    • logs are captured and sent to the console (if option enabled) with attribution to the resource that sent them
    • adds support for clients seeing previous inspector history from before they were connected
  • cloudflare's devtools (which are a patch of chrome devtools to better support workers) are hosted on inspect.localhost:<port> for any worker running on localhost:<port>. These devtools will autoconnect to the worker.
  • logToConsole dev option for workers to allow hiding logs from terminal (defaults to true)

Currently soft-blocked by a miniflare bug.

FIXED; WAITING FOR NEXT MINIFLARE RELEASE
see Miniflare PR: 9784
When we add new workers to miniflare via setOptions an inspector proxy ins't started for that worker.
There does seem to be a way to get all of the proxies, but its not reliable.

Copy link

pkg-pr-new bot commented Jul 2, 2025

Open in StackBlitz

npm i https://pkg.pr.new/sam-goodwin/alchemy@532

commit: 2ba7120

Copy link

github-actions bot commented Jul 2, 2025

🚀 Website Preview Deployed

Your website preview is ready!

Preview URL:

This preview was built from commit 524be3c


🤖 This comment will be updated automatically when you push new commits to this PR.

@sam-goodwin sam-goodwin moved this to In Progress in alchemy Jul 4, 2025
Copy link

github-actions bot commented Jul 8, 2025

🚀 Website Preview Deployed

Your website preview is ready!

Preview URL: https://b3902c1f-alchemy-website.alchemy-run.workers.dev

This preview was built from commit 20b7527


🤖 This comment will be updated automatically when you push new commits to this PR.

@Mkassabov Mkassabov changed the title Mkassabov/better dev worker logging feat(dev): inspector-proxy and worker logging improvements Jul 8, 2025
@Mkassabov Mkassabov force-pushed the mkassabov/better-dev-worker-logging branch from 5093998 to 2ba7120 Compare July 8, 2025 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant