-
Notifications
You must be signed in to change notification settings - Fork 168
👷 Update README in developer-extension to reflect the new build process #4153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,27 +6,7 @@ Browser extension to investigate your Browser SDK integration. | |||||||||||||||||
|
|
||||||||||||||||||
| ### From the Chrome Web Store | ||||||||||||||||||
|
|
||||||||||||||||||
| The extension is available to **Datadog employees** on the [Chrome Web Store](https://chrome.google.com/webstore/detail/datadog-browser-sdk-devel/boceobohkgenpcpogecpjlnmnfbdigda). | ||||||||||||||||||
|
|
||||||||||||||||||
| ### By loading the extension unpacked | ||||||||||||||||||
|
|
||||||||||||||||||
| The packed extension is not (yet?) published publicly. You will need to clone this repository and | ||||||||||||||||||
| build the extension manually. | ||||||||||||||||||
|
|
||||||||||||||||||
| ``` | ||||||||||||||||||
| $ git clone https://github.com/DataDog/browser-sdk | ||||||||||||||||||
| $ cd browser-sdk | ||||||||||||||||||
| $ yarn | ||||||||||||||||||
| $ yarn build | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| Then, in Google Chrome: | ||||||||||||||||||
|
|
||||||||||||||||||
| - Open the _Extension Management_ page by navigating to [chrome://extensions](chrome://extensions). | ||||||||||||||||||
| - Enable _Developer Mode_ by clicking the toggle switch next to _Developer mode_. | ||||||||||||||||||
| - Click the _LOAD UNPACKED_ button and select the `browser-sdk/developer-extension/dist` | ||||||||||||||||||
| directory. | ||||||||||||||||||
| - Open devtools and the extension features are located on the `Browser SDK` panel. | ||||||||||||||||||
| The extension is available on the [Chrome Web Store](https://chrome.google.com/webstore/detail/datadog-browser-sdk-devel/boceobohkgenpcpogecpjlnmnfbdigda). | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Features | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
@@ -90,13 +70,33 @@ Info tab contains information about Session and RUM SDK configurations | |||||||||||||||||
| Read the [Extend the developers | ||||||||||||||||||
| tools](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Extending_the_developer_tools) | ||||||||||||||||||
| MDN guide to get up to speed with WebExtensions for devtools. In particular, look for the | ||||||||||||||||||
| various entrypoints (panel.html, devtools.html) and the content script communication, as it' | ||||||||||||||||||
| s not straightforward. | ||||||||||||||||||
| various entrypoints (panel.html, devtools.html) and the content script communication, as it's not straightforward. | ||||||||||||||||||
|
|
||||||||||||||||||
| ### By loading the extension unpacked | ||||||||||||||||||
|
|
||||||||||||||||||
| You will need to clone this repository and build the extension manually. | ||||||||||||||||||
|
|
||||||||||||||||||
| ``` | ||||||||||||||||||
| $ git clone https://github.com/DataDog/browser-sdk | ||||||||||||||||||
| $ cd browser-sdk | ||||||||||||||||||
| $ yarn | ||||||||||||||||||
| $ yarn build | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| Then, in Google Chrome: | ||||||||||||||||||
|
|
||||||||||||||||||
| - Open the _Extension Management_ page by navigating to [chrome://extensions](chrome://extensions). | ||||||||||||||||||
| - Enable _Developer Mode_ by clicking the toggle switch next to _Developer mode_. | ||||||||||||||||||
| - Click the _LOAD UNPACKED_ button and select the `browser-sdk/developer-extension/dist/chrome-mv3/` directory. | ||||||||||||||||||
| - Open devtools and the extension features are located on the _Browser SDK_ panel. | ||||||||||||||||||
|
Comment on lines
+88
to
+91
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| ### Using the dev server | ||||||||||||||||||
|
|
||||||||||||||||||
| To work on the developer extension and debug it easily: | ||||||||||||||||||
|
|
||||||||||||||||||
| 1. In a terminal, cd into the `developer-extension` folder. | ||||||||||||||||||
|
|
||||||||||||||||||
| 2. Run `yarn dev`. | ||||||||||||||||||
| 3. A Chrome browser window with the developer extension loaded opens automatically. | ||||||||||||||||||
|
Comment on lines
98
to
+99
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Because the Chrome window opening is not an action the user can take, I've moved it up to the previous step. It's a result of the action taken in this step.) |
||||||||||||||||||
| 4. After you make a change, right-click on the extension UI and select **"Reload frame"** to see your updates. | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| 3. A Chrome browser window with the developer extension loaded opens. | ||||||||||||||||||
| > **Tip:** If you are running `yarn dev` and want to load the extension into your own Chrome profile, you can load the `dist/chrome-mv3-dev/` folder instead of `dist/chrome-mv3/`. This dev build includes hot reload support. | ||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't clear to me what this header means: is loading the extension unpacked an alternative to using the dev server? If so, I would drop the "by" and potentially add a sentence above mentioning that there are two options here.