-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for DevTools extensions (#10061)
These docs will be linked to from the `devtools_options.yaml` file that DevTools creates for storing extension enablement states: flutter/devtools#7052 --------- Co-authored-by: Brett Morgan <brettmorgan@google.com> Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
- Loading branch information
1 parent
4da6d30
commit ec6dd6d
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: DevTools extensions | ||
description: Learn how to use and build DevTools extensions. | ||
--- | ||
|
||
## What are DevTools extensions? | ||
|
||
[DevTools extensions](https://pub.dev/packages/devtools_extensions) are developer | ||
tools provided by third-party packages that are tightly integrated into the | ||
DevTools tooling suite. Extensions are distributed as part of a pub package, | ||
and they are dynamically loaded into DevTools when a user is debugging their app. | ||
|
||
## Use a DevTools extension | ||
|
||
If your app depends on a package that provides a DevTools extension, the | ||
extension automatically shows up in a new tab when you open DevTools. | ||
|
||
### Configure extension enablement states | ||
|
||
You need to manually enable the extension before it loads for the first time. | ||
Make sure the extension is provided by a source you trust before enabling it. | ||
|
||
![Screenshot of extension enablement prompt]({{site.url}}/assets/images/docs/tools/devtools/extension_enable_prompt.png) | ||
|
||
Extension enablement states are stored in a `devtools_options.yaml` file in the | ||
root of the user's project (similar to `analysis_options.yaml`). This file | ||
stores per-project (or optionally, per user) settings for DevTools. | ||
|
||
If this file is **checked into source control**, the specified options are | ||
configured for the project. This means that anyone who pulls a project's | ||
source code and works on the project uses the same settings. | ||
|
||
If this file is **omitted from source control**, for example by adding | ||
`devtools_options.yaml` as an entry in the `.gitignore` file, then the specified | ||
options are configured separately for each user. Since each user or | ||
contributor to the project uses a local copy of the `devtools_options.yaml` | ||
file in this case, the specified options might differ between project contributors. | ||
|
||
## Build a DevTools extension | ||
|
||
For an in-depth guide on how to build a DevTools extension, check out | ||
[Dart and Flutter DevTools extensions][article], a free article on Medium. | ||
|
||
|
||
[article]: {{site.flutter-medium}}/dart-flutter-devtools-extensions-c8bc1aaf8e5f |