Skip to content

Commit 61644d0

Browse files
authored
Update CONTRIBUTING documentation for the debug extension (#1460)
1 parent 7bfdd19 commit 61644d0

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

dwds/debug_extension/CONTRIBUTING.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,38 @@ pub run build_runner build web -o build -r
1111
```
1212
pub run build_runner build web -o build
1313
```
14+
## Local Development
15+
16+
### Update `manifest.json`:
17+
18+
* Change the `default_icon` in `manifest.json` to `dart_dev.png` (Note: this is not strictly necessary, but will help you to distinguish your local version of the extension from the published version)
19+
* [For Googlers] The developer key is needed for local development and testing. Add one of the whitelisted keys to `web/manifest.json`. IMPORTANT: DO NOT COMMIT THE KEY.
20+
21+
```
22+
{
23+
"name": "Dart Debug Extension",
24+
"key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
25+
...
26+
}
27+
```
28+
29+
### Build and upload your local extension
30+
31+
* Build the extension following the instructions above
32+
* Visit chrome://extensions
33+
* Toggle "Developer mode" on
34+
* Click the "Load unpacked" button
35+
* Select the extension directory: `/dwds/debug_extension/build/web`
36+
37+
### Debug your local extension
38+
* Click the Extensions puzzle piece, and pin the Dart Debug Extension with the dev icon (unpin the published version so you don't confuse them)
39+
* You can now use the extension normally by clicking it when a local Dart web application has loaded in a Chrome tab
40+
* To debug, visit chrome://extensions and click "Inspect view on background page" to open Chrome DevTools for the extension
41+
* More debugging information can be found in the [Chrome Developers documentation](https://developer.chrome.com/docs/extensions/mv3/devguide/)
42+
1443

1544
## Deployment
1645

1746
- Update the version number in `web/manifest.json`.
1847
- Zip `web/manifest.json`, `web/background.js`, and `dart.png`.
1948
- Upload the `.zip` to the Chrome Web Store.
20-
21-
## [For Googlers] Local Development
22-
23-
The developer key is needed for local development and testing. Add one of the whitelisted keys to `web/manifest.json`.
4.63 KB
Loading

0 commit comments

Comments
 (0)