-
Notifications
You must be signed in to change notification settings - Fork 32
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
Docs: Using React Tools debugger with Grafana #1559
base: main
Are you sure you want to change the base?
Conversation
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
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.
Looks good. There are just some style and clarity issues. I'll be happy to take another look after this PR gets out of draft mode.
@@ -0,0 +1,78 @@ | |||
--- | |||
id: debugging-plugins | |||
title: Add anonymous usage reporting |
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.
The title should match the H1 on line 12
|
||
# How to set up Grafana for React Tools profiling and debugging | ||
|
||
Using the React Tools debugger in the browser is very useful when either creating a new plugin or troubleshooting an issue with an existing plugin. |
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.
Using the React Tools debugger in the browser is very useful when either creating a new plugin or troubleshooting an issue with an existing plugin. | |
The React Tools debugger in the browser is invaluable for developing new Grafana plugins and troubleshooting existing ones. |
|
||
## Setup for debugging | ||
|
||
By default Grafana docker images do not include a debug build for React. |
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.
By default Grafana docker images do not include a debug build for React. | |
By default, Grafana Docker images do not contain a React debug build. |
|
||
By default Grafana docker images do not include a debug build for React. | ||
|
||
By using a debug build of grafana you are able to easily step through code that has not been "uglified" and also use the "Profiler" in React Dev Tools. |
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.
I'm not sure what "uglified" means or why Profiler is in quotes. If Profiler is a UI element, you can put it in bold.
|
||
By using a debug build of grafana you are able to easily step through code that has not been "uglified" and also use the "Profiler" in React Dev Tools. | ||
|
||
To use a debug build, update your `docker-compose.yml` with the corresponding version found on hub.docker.com. |
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.
To use a debug build, update your `docker-compose.yml` with the corresponding version found on hub.docker.com. | |
To use a debug build, update your `docker-compose.yml` with the corresponding version found on [hub.docker.com](https://hub.docker.com/). |
... | ||
``` | ||
|
||
Alternatively you can use an environment variable and not modify the existing docker-compose.yml file: |
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.
Alternatively, you can use an environment variable instead of modifying the existing docker-compose.yml
file:
... | ||
``` | ||
|
||
Alternatively you can use an environment variable and not modify the existing docker-compose.yml file: |
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.
Alternatively you can use an environment variable and not modify the existing docker-compose.yml file: | |
Alternatively, you can use an environment variable without modifying the existing `docker-compose.yml` file: |
|
||
## Using React Tools | ||
|
||
Once your docker environment has started up, navigate to the instance and select |
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.
Once your docker environment has started up, navigate to the instance and select | |
After your Docker environment starts, go to the instance and select |
|
||
Once your docker environment has started up, navigate to the instance and select | ||
|
||
`View->Developer->Developer Tools` |
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.
`View->Developer->Developer Tools` | |
**View** > **Developer** > **Developer Tools**. |
|
||
`View->Developer->Developer Tools` | ||
|
||
You can now use the "Profiler" tab in the debugging tools, which provides Flamegraph, Ranked, and Timeline options. |
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.
You can now use the "Profiler" tab in the debugging tools, which provides Flamegraph, Ranked, and Timeline options. | |
You can now use the **Profiler** tab in the debugging tools, which provides Flamegraph, Ranked, and Timeline options. |
What this PR does / why we need it:
Adds docs for setting up debugging tools for Grafana developers
Which issue(s) this PR fixes:
Fixes #1058
Special notes for your reviewer:
Requires grafana/grafana#101027