The canonical entry point. Body explicitly cites React DevTools (the Chrome extension) as inspiration and asks for:
- component tree
- timeline of component updates
- timeline of agent calls
Activity is thin:
- 2023-10-23 JADSN1894 linked a third-party extension https://github.com/JADSN1894/yew-debugger, built on three user-implemented traits (
YewComponentModel,YewComponentMessage,YewComponentDebug). MVU-flavored, not function-component aware out of the box. - 2023-10-24 ranile (maintainer) asked how well it works with function components. Never answered.
Draft. Opens a thread_local! WebSocket and pushes component info to a not-yet-built browser extension. Got rebase-tangled and was superseded by #1221. Reviewer (jstarry) was supportive.
Rewrite of #1094. Closed as stale by jstarry with "Feel free to re-open when you have time to dig back in." Author committed to finishing later but never returned.
Shape of the diff (useful if anyone picks this up):
- Cargo feature:
devtools(separate fromdev). - New crates:
devtools/(WebSocket echo/relay server, Rust binary) anddevtools-extension/(skeleton browser extension shell). - New module
yew/src/devtools/with:DebuggerConnection(thread-localRefCell, holdsweb_sys::WebSocket+ queue).ComponentMessage { eventdata, metadata }where:ComponentEventisMounted | Unmounted | Updated | Created { serialized_props } | Destroyed.ComponentMetadata { name: String, selector: Option<String> }.selectoris built by walkingparent_node()up the live DOM and concatenatingnode_name()segments.
- Hooks into
Scope::newto fireCreated { serialized_props }. - Conditionally tightens the
Propertiestrait to requireSerialize + Deserializewhen the feature is on (jstarry's suggestion, so the extension can pretty-print props). - Connection target is configurable via env vars at compile time:
YEW_DEBUGGER_CONNECTION_TYPE(ws/wss),YEW_DEBUGGER_HOST,YEW_DEBUGGER_PORT(defaultlocalhost:8017).
Open design questions left in the thread:
- Multiple Yew apps on one page muxing into one debugger connection.
- Function-component support (the data model is struct-component shaped).
- Whether the
devmodule belongs in coreyewor a separateyew-devtools-clientcrate (jstarry preferred the latter).
- https://github.com/JADSN1894/yew-debugger - independent extension, requires three trait impls per component, MVU-style timeline. Function-component story unclear.