Those API options should enable
Those API options should enable
workerd
's logging. Wrangler actually uses the DevTools inspector protocol for logging instead.14 Replies
FWIW I can' t seem to get logs via chrome://inspect, and when I manually hit
http://127.0.0.1/PORT/json
, the devtoolsFrontendUrls
all give me the attached errorHave you configured an
inspectorPort
(https://github.com/cloudflare/miniflare/blob/tre/packages/miniflare/README.md#core-1)?Yep,
And I get
workerd/server/server.c++:2431: info: Inspector is listening
Do you see
info: Inspector client attaching [core:user:]
too? Make sure you inspect the core:user
service, not core:entry
👀 No, I don't see any further
workerd
log after info: Inspector is listening
What I'm doing now is hitting the json
endpoint: curl "http://127.0.0.1:9000/json" | jq '.[]'
, then pasting devtoolsFrontendUrl
into Chrome. That gets me to the "WebSocket disconnected" above
From the first core:user:<WORKER_NAME>
Hmm ok, I see
WebSocket disconnected
when I do that too, but not if I go to chrome://inspect
and click the inspect
link for the core:user
serviceThe
core:user
services aren't appearing for me in dev tools at allCould you try
inspectorPort: 9229
instead?Aha!
They appear!
And if I understand correctly, there's no convenient way for me to collate all the logs from the various services into one DevTools console or my terminal?
Unfortunately not
Rats
Then count me in for a Docker Compose-style solution, I'd love to get everything in one process.
You could try build your own DevTools proxy that collated everything and re-exposed a single DevTools server, but that's probably quite a bit of work
Yeah, that's immediately where my head goes, but I think for now this is good enough. Gotta get back to working on features.
Really appreciate the help @mrbbot, you're killin' it on Miniflare! If you do end up pursuing a compose approach, I'm happy to help however I can
Thanks! 😃