-
Notifications
You must be signed in to change notification settings - Fork 334
[dev] pass --inspect flag to get websocket endpoint for chrome://inspect #946
Comments
@EverlastingBugstopper when Since I imagine the node process would be killed. |
I'm not sure actually - would need to see how it all works. My guess is yes - but we'd attempt to achieve parity with whatever |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. You may re-open the issue if it is still relevant. |
node provides an interesting way to attach a debugger to its REPL
You can then navigate to chrome://inspect and it will show a node instance. If you run console.log in the node process, it will show up in the console on the browser.
I think it would be a good idea to add
--inspect
towrangler dev
. This would mean that when your dev server starts up, it acts the same way in the terminal, except it also takes all websocket messages it receives and passes it to a local websocket listening on your machine. This would work the same way that the node inspector does, and you'd be able to navigate tochrome://inspect
and see wrangler dev there instead of node.A pitfall with this is that the runtime's implementation of the devtools protocol is incomplete (you can't set breakpoints). But I still think it's worth having - especially for interacting with large nested objects and viewing network requests.
The text was updated successfully, but these errors were encountered: