JADSN1894 / yew-debugger

An Elm-like debugger DevTools extension for Yew.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YewDebugger

Makefile CI Repository license Crates.io: yew-debugger Crates.io: yew-debugger-derive (derive)

yew-debugger is a devtools extension for debugging Yew applications that includes the following features:

  • It is built upon the minimally invasive implementation of only three traits: YewComponentModel, YewComponentMessage, and YewComponentDebug.
  • It offers a detailed view of messages and changes in the Model during state transitions.
  • It provides a real-time, straight-forward view of the application's MVU (Model, View, Update) cycles.

Screenshot

Screenshot

Getting Started

Cloning the repository

  1. Clone the repository: git clone --depth=1 git@github.com:JADSN1894/yew-debugger.git
  2. Change to directory yew-debugger: cd yew-debugger
  3. Open yew-debugger folder in VsCode: code .
  4. Install the extension Dev Containers
  5. Open the Dev Container

Screenshot

  1. Install the extensions (Optional)

Screenshot

  1. When see the "...Done. Press any ke to close the terminal." press c:

Screenshot

  1. Open new terminal:

Screenshot

  1. Execute: make demo
  2. Execute: python3 -m http.server --directory ./dist-example/
  3. In a chromium-based open extensions window: chrome://extensions/
  4. At right top corner enable Developer mode

Screenshot

  1. Click at Load unpacked button
  2. Open the crx folder, (If comming from actions artifacts section, the folder name is yew-debugger-crx)
  3. Click at service worker(inactive)
  4. Check if show at least this two logs:
    1. [From background module]: Hello from YewDebugger
    2. Yew Debugger devtools tab clicked
  5. Open in new tab: http://localhost:8000/
  6. Open DevTools pressing F12 or crtl + shift + i
  7. At DevTools panel tab open the tab Yew Debugger
  8. And controll your application. 😎

From actions artifacts

  1. Download the artifacts:
    1. yew-debugger-crx.zip
    2. dist-example-yew-debugger-counter-layout.zip
    3. dist-example-spreadsheet-cells-with-yew-debugger.zip
  2. Create a folder named: yew-debugger
  3. Change to directory: cd yew-debugger
  4. Extract the compressed files :
    1. unzip yew-debugger-crx.zip -d crx
    2. unzip dist-example-yew-debugger-counter-layout.zip -d dist-example-yew-debugger-counter-layout
    3. unzip dist-example-spreadsheet-cells-with-yew-debugger.zip -d dist-example-spreadsheet-cells-with-yew-debugger
    4. Directory after extract
     .
     β”œβ”€β”€ dist-example-spreadsheet-cells-with-yew-debugger
     β”‚   β”œβ”€β”€ frontend-wasm
     β”‚   β”‚   β”œβ”€β”€ index_bg.wasm
     β”‚   β”‚   β”œβ”€β”€ index.js
     β”‚   β”‚   └── package.json
     β”‚   β”œβ”€β”€ index.html
     β”‚   β”œβ”€β”€ index.js
     β”‚   └── output.css
     β”œβ”€β”€ dist-example-spreadsheet-cells-with-yew-debugger.zip
     β”œβ”€β”€ dist-example-yew-debugger-counter-layout
     β”‚   β”œβ”€β”€ assets
     β”‚   β”‚   β”œβ”€β”€ index-0c5742a5.js
     β”‚   β”‚   β”œβ”€β”€ index_bg-2f50b49e.wasm
     β”‚   β”‚   └── index-d9ca7bb5.css
     β”‚   β”œβ”€β”€ favicon.ico
     β”‚   β”œβ”€β”€ index.html
     β”‚   └── vite.svg
     β”œβ”€β”€ dist-example-yew-debugger-counter-layout.zip
     β”œβ”€β”€ yew-debugger-crx
     β”‚   β”œβ”€β”€ assets
     β”‚   β”‚   β”œβ”€β”€ index-643717a7.css
     β”‚   β”‚   β”œβ”€β”€ index-df5db1f8.js
     β”‚   β”‚   └── panel_bg-88b3fac6.wasm
     β”‚   β”œβ”€β”€ background
     β”‚   β”‚   β”œβ”€β”€ background_bg.wasm
     β”‚   β”‚   β”œβ”€β”€ background.js
     β”‚   β”‚   └── package.json
     β”‚   β”œβ”€β”€ background.js
     β”‚   β”œβ”€β”€ content-script.js
     β”‚   β”œβ”€β”€ devtools.html
     β”‚   β”œβ”€β”€ devtools.js
     β”‚   β”œβ”€β”€ manifest.json
     β”‚   └── panel.html
     └── yew-debugger-crx.zip
    
    1. Follow the steps from 8 of Cloning the repository instructions

πŸ‘ Acknowledgements

Huge thanks to afsec for giving me the idea for this project, sharing the inspiration behind it, and implementing the first iteration in Rust. Your contributions have been invaluable.

πŸ“ͺ Contact

Feel free to reach out to me at E-mail to discuss how yew-debugger can elevate the quality of your Yew development and improve the end-user experience!

About

An Elm-like debugger DevTools extension for Yew.

License:MIT License


Languages

Language:Rust 59.2%Language:Makefile 16.1%Language:Shell 13.0%Language:JavaScript 7.9%Language:Dockerfile 2.8%Language:HTML 0.8%Language:CSS 0.1%