Commit de841e7
committed
debug: Add comprehensive channel and state logging
Add detailed debug logging to track all channel operations and state
changes in the webgpu-cube example. This will help diagnose why the
auto-rotate state isn't updating when the toggle button is clicked.
Logging added for:
- Initial state send in App constructor
- Command reception and processing
- State changes (autoRotate, speed, rotation)
- State updates sent to controlState channel
- Controls component state reception
- Button click events
- Render cycles with current state
- app.Update() calls
All logs prefixed with component/operation for easy filtering:
- [Goroutine] - goroutine lifecycle
- [Command] - command details
- [State Change] - variable updates
- [State Send] - state sent to channel
- [State Receive] - state received from channel
- [Controls] - Controls component operations
- [Controls.Render] - render cycle info
This will help identify if:
1. Commands are being received
2. State is being updated
3. State updates are being sent
4. Controls is receiving updates
5. Re-renders are being triggered1 parent bd8e648 commit de841e7
3 files changed
Lines changed: 61 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments