Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
3d7102d
added mime checks, minor logic improvements in recording
hrajwade96 Apr 12, 2025
b7a5310
mime fixes
hrajwade96 May 24, 2025
e94558c
Prevent web apps from freezing after hot-restarts triggered from DevT…
elliette Apr 14, 2025
7b0d352
Prepare cherry-pick release - DevTools 2.45.1
elliette Apr 15, 2025
a0c48b1
Re-enable `discarded_futures` lint (#9117)
elliette Apr 10, 2025
db827d6
Update DevTools to next `dev` version: `2.46.0-dev.0` (#9133)
elliette Apr 11, 2025
76c2749
Prevent web apps from freezing after hot-restarts triggered from DevT…
elliette Apr 14, 2025
b7c4aaf
Update Flutter and min sdk versions (#9140)
kenzieschmoll Apr 15, 2025
20a0f03
DevTools colors match IDE theme (#9144)
elliette Apr 16, 2025
78aafae
Do not show release notes for standalone screens (#9147)
kenzieschmoll Apr 17, 2025
e74fb2f
Dismiss banner messages on connection changes by default (#9148)
kenzieschmoll Apr 17, 2025
99447af
Skip simple_items_test.dart for customer tests (#9150)
kenzieschmoll Apr 17, 2025
06a7ccf
Remove reference to removed `NodeGlue` (#9151)
brianquinlan Apr 21, 2025
3e85371
Do not await service extension call in the performance screen (#9162)
kenzieschmoll May 1, 2025
aba3d4a
Bump flutter candidate and update formatting. (#9165)
kenzieschmoll May 1, 2025
5499842
Fix a focus traversal issue with search fields (#9166)
kenzieschmoll May 2, 2025
d4a0a34
Clean up abstract classes that only contain static methods (#9170)
kenzieschmoll May 2, 2025
3187c2c
Use consistent widget inspector icon across Flutter and DevTools (#9163)
elliette May 2, 2025
ac97ad9
Prepare for release 2.46.0 (#9171)
elliette May 2, 2025
11b22c1
Fix broken internal link in README (#9180)
srawlins May 7, 2025
cd02118
Nits in Contributing doc (#9181)
srawlins May 7, 2025
145c78f
Prepare `devtools_shared` for publish (#9183)
kenzieschmoll May 8, 2025
9f48ce1
Enable unnecessary_async lint rule (#9184)
srawlins May 9, 2025
74d21a2
Fix a bug with detecting DevTools server availability (#9189)
kenzieschmoll May 13, 2025
b42300f
Add android platform to extensions example app (#9199)
kenzieschmoll May 16, 2025
f4a1ca4
Plumb the `serve-with-dart-sdk` command through to the `dt run` comma…
kenzieschmoll May 16, 2025
a4f4566
Fix lifecycle issue in DTDManager (#9200)
kenzieschmoll May 16, 2025
dc47e21
[Widget Inspector] Update Select Widget Mode icon (#9192)
elliette May 22, 2025
a38b679
[Property Editor] Include error code in exceptions sent to GA (#9209)
elliette May 27, 2025
4c0207a
[Property Editor] Add APIs to support refactors from the Property Edi…
elliette May 27, 2025
e032286
[Product Quality] Fix copy-to-clipboard behavior in the console (#9204)
elliette May 27, 2025
9934bd3
Allow the `--update-on-path` flag to be passed to the `dt sync` comma…
kenzieschmoll May 29, 2025
85ec2ee
Update TRIAGE.md (#9220)
stuartmorgan-g May 30, 2025
8e7df30
[Property Editor] Add UI for triggering "Wrap with" refactors (#9213)
elliette May 30, 2025
9daa1b0
[Property Editor] Flag clean-up (#9215)
elliette May 30, 2025
711b1d9
Update inspector integration tests to handle Flutter breaking change …
elliette May 30, 2025
52f2a09
[Property Editor] Refactor dropdown matches IDE theme (#9230)
elliette May 30, 2025
dd6c954
Enable Property Editor refactors (#9227)
elliette Jun 2, 2025
e6a0f4d
Prepare DevTools for 2.47.0 release (#9233)
kenzieschmoll Jun 2, 2025
ea50019
Register and unregister VM service connections on DTD from the DevToo…
kenzieschmoll Jun 2, 2025
b8d1f35
Update contributing instrucitons (#9235)
kenzieschmoll Jun 3, 2025
8ee9ad0
Prep next dev version of DevTools (#9237)
kenzieschmoll Jun 3, 2025
7206d27
Adds a new DTDTools screen behind the Advanced Developer Mode setting…
kenzieschmoll Jun 3, 2025
bb6a735
Bump `dtd` dep to 4.0.0 (#9240)
kenzieschmoll Jun 4, 2025
fa691c6
Bump actions/checkout (#9243)
dependabot[bot] Jun 6, 2025
ff0af55
Add support for connecting to the DevTools server from integration te…
kenzieschmoll Jun 9, 2025
326df87
[tool] Add an option to specify the path of a Flutter SDK (#9250)
srawlins Jun 11, 2025
4729e00
Upgrade to the latest Flutter SDK (#9244)
kenzieschmoll Jun 12, 2025
3d41fd5
Show `Timer` events in the Logging View (#9238)
derekxu16 Jun 13, 2025
6ea5ddc
Add Queued Microtasks tab to VM Tools screen (#9239)
derekxu16 Jun 16, 2025
d332356
Swallow exceptions related to trying to dispose an inspector group (#…
kenzieschmoll Jun 23, 2025
a8cdea4
Swallow exceptions related to an already disposed service connection …
kenzieschmoll Jun 23, 2025
972df6e
Ignore expected exceptions from the `navigateToCode` extension method…
kenzieschmoll Jun 23, 2025
e6761a4
Bump Flutter SDK to latest (#9267)
kenzieschmoll Jun 24, 2025
6d2b467
Bump build_runner to 2.5.x for faster builds (#9268)
srawlins Jun 24, 2025
e6889b3
Ensure pub get is ran for all packages for flutter customer tests (#9…
kenzieschmoll Jun 24, 2025
603e40c
Fix comment on "forEachIsolate" (#9272)
srawlins Jun 25, 2025
0b3a76d
Small readability tweak in forEachIsolateHelper (#9273)
srawlins Jun 25, 2025
d3e1c09
NetworkService: small tweaks (#9274)
srawlins Jun 25, 2025
00467ba
Add a GEMINI.md file and .gitignore entry (#9279)
kenzieschmoll Jun 26, 2025
07336fb
Fork all debugging docs out of CONTRIBUTING.md into their own doc (#9…
srawlins Jun 27, 2025
3052daf
Do not mark service extensions as 'added' so eagerly (#9271)
srawlins Jul 1, 2025
be3654f
devtools_app_shared: add CHANGELOG entry (#9289)
srawlins Jul 2, 2025
93a1195
Use --no-minify-wasm when creating devtools for releases. (#9284)
biggs0125 Jul 2, 2025
ed2305b
ServiceExtensionManager: return early... earlier (#9287)
srawlins Jul 2, 2025
d6c418f
ServiceExtensionManager: simplify code around service state and avail…
srawlins Jul 2, 2025
9170d26
ServiceExtensionManager: avoid switching on runtime type (#9286)
srawlins Jul 3, 2025
56dbdd5
Bump DevTools version for next release cycle (#9296)
kenzieschmoll Jul 7, 2025
d25d28f
Reset thresholds for performance benchmarks (#9257)
kenzieschmoll Jul 7, 2025
a5e27c0
Remove `scaleByFontFactor` method and usages (#9304)
elliette Jul 11, 2025
4035f08
Tidy up some nits in ServiceConnectionManager (#9311)
srawlins Jul 14, 2025
1861889
Upgrade DCM to v1.30.0 (#9310)
kenzieschmoll Jul 14, 2025
7e4c234
Support --dtd-exposed-uri in dt (#9302)
DanTup Jul 15, 2025
ad983c5
Find available port to run benchmarks (#9315)
mdebbar Jul 15, 2025
d424adf
Add debugging text to integration_test README (#9316)
srawlins Jul 15, 2025
d5a418b
Add timestamps to various test logging utilities (#9319)
srawlins Jul 17, 2025
1759821
Correctly set visibility of floating debugging controls (#9327)
elliette Jul 17, 2025
5b7cbab
Add release notes for PR #9327 (#9329)
elliette Jul 17, 2025
e036909
Minor cleanup to CPU profile screen code (#9324)
parlough Jul 18, 2025
b97c2de
Rework the integration test timeout logic (#9322)
srawlins Jul 21, 2025
183572b
Inspector integration tests are resilient to Flutter framework change…
elliette Jul 21, 2025
3cfac21
Decrease ring buffer size to 2^31 - 1 which is wasm limit (#9341)
biggs0125 Jul 23, 2025
902efc8
Use service extension in networking integration test (#9323)
srawlins Jul 23, 2025
87c7b04
Don't assume footer is present in _ConsoleOutputState builder. (#9342)
biggs0125 Jul 23, 2025
36489b2
Enable `ColumnData` and subclasses to be const (#9326)
parlough Jul 24, 2025
1746446
Bump actions/checkout (#9344)
dependabot[bot] Jul 24, 2025
22af937
Touch up cherry-picking instructions (#9347)
srawlins Jul 24, 2025
e67446c
Avoid conflating concept of duration in `TimeRange` util class (#9325)
parlough Jul 25, 2025
85e1002
Do not autofocus on filter fields (#9330)
elliette Jul 28, 2025
066a558
RELEASE_INSTRUCTIONS: Fix text around fields in CR (#9350)
srawlins Jul 29, 2025
93bfe8a
Use SelectionArea instead of SelectableText (#9333)
elliette Jul 29, 2025
56d90a6
Update to latest Flutter candidate version (#9351)
elliette Jul 29, 2025
7273e51
Reset DevTools to next dev version (#9360)
elliette Aug 1, 2025
84a2fbf
Update DevTools release instructions (#9359)
elliette Aug 1, 2025
ebce6f5
[CPU Profiler] Delete the "Profile app start up" button (#9358)
derekxu16 Aug 6, 2025
f0194be
Remove intermediary JSON conversion from `generateFromCpuSamples` (#9…
elliette Aug 7, 2025
caf5a0e
Delete unused test utilities file `chrome.dart` (#9372)
elliette Aug 8, 2025
049a045
Bump actions/checkout (#9381)
dependabot[bot] Aug 11, 2025
2e0e4ea
fix local markdown file links (#9384)
pq Aug 12, 2025
de96120
Include stacktrace when dt command fails (#9385)
elliette Aug 12, 2025
6627ac6
Bump actions/checkout (#9386)
dependabot[bot] Aug 12, 2025
abc1a90
Get DevTools tests passing with latest Flutter candidate (#9382)
elliette Aug 15, 2025
802c2da
Temporarily disable widget tests in `inspector_service_test` (#9396)
elliette Aug 18, 2025
4d7f2fe
Re-enable `inspector_service` test cases (#9402)
elliette Aug 21, 2025
41b21f4
Add `compiler=js` escape hatch to revert to dart2js compilation (#9406)
elliette Aug 21, 2025
42e55f4
Prepare for release 2.50.0 (#9407)
srawlins Aug 22, 2025
a37b49d
Revert PR #9372: Un-delete `packages/devtools_shared/lib/src/test/chr…
elliette Aug 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 15 additions & 14 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand All @@ -57,7 +57,7 @@ jobs:
fail-fast: false
steps:
- name: Clone Flutter DevTools
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: "${{ github.event.pull_request.head.sha }}"
- name: Load Cached Flutter SDK
Expand All @@ -74,7 +74,7 @@ jobs:
wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
sudo apt-get update
sudo apt-get install dcm=1.24.2-1 # To avoid errors add `-1` (build number) to the version
sudo apt-get install dcm=1.30.0-1 # To avoid errors add `-1` (build number) to the version
sudo chmod +x /usr/bin/dcm
echo "$(dcm --version)"
- name: Setup Dart SDK
Expand All @@ -97,7 +97,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand All @@ -119,7 +119,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand All @@ -144,7 +144,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand All @@ -171,7 +171,7 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand Down Expand Up @@ -205,7 +205,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
# TODO(https://github.com/flutter/devtools/issues/9357): Re-enable tests on windows-latest.
os: [macos-latest]
# Consider running integration tests in ddc mode, too.
bot: [integration_dart2js]
device: [flutter, flutter-web, dart-cli]
Expand Down Expand Up @@ -242,7 +243,7 @@ jobs:
shard: 3/3
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand Down Expand Up @@ -276,7 +277,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand All @@ -297,7 +298,7 @@ jobs:
fail-fast: false
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand All @@ -315,7 +316,7 @@ jobs:
fail-fast: false
steps:
- name: git clone
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Load Cached Flutter SDK
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
Expand All @@ -338,7 +339,7 @@ jobs:
# - test_dart2js
# steps:
# - name: git clone
# uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
#
# - name: tool/ci/bots.sh
# env:
Expand All @@ -358,7 +359,7 @@ jobs:
# - integration_dart2js
# steps:
# - name: git clone
# uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# - name: tool/ci/bots.sh
# env:
# BOT: ${{ matrix.bot }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-dev-bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: git clone devtools
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: master

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter-candidate-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: git clone devtools
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: master

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# TODO(https://github.com/flutter/devtools/issues/5729) Consider caching DevTools so that we
# don't check it out again is subsequent workflows.
- name: Checkout DevTools (default)
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Get Latest Flutter Candidate
id: flutter-candidate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-bot-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Sparse checkout of the repository
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
sparse-checkout: |
README.md
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ DEPENDENCIES.md
**/logs/**
*.stager_app.g.dart

# Ignore Gemini logs
**/.gemini/

# Ignore VS code workspaces that may be configured per-user
*.code-workspace

Expand Down
165 changes: 19 additions & 146 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ You can do this online, and it only takes a minute.

2. Review the [DevTools style guide](STYLE.md), which uses a combination of Dart and Flutter best practices.

## Table of contents
1. [Developing for DevTools](#developing-for-devtools)
- [Set up your DevTools environment](#set-up-your-devtools-environment)
- [Workflow for making changes](#workflow-for-making-changes)
- [Keeping your fork in sync](#keeping-your-fork-in-sync)
2. [Running and debugging DevTools](#running-and-debugging-devtools)
- [Frontend only (most common)](#frontend-only-most-common)
- [Frontend + DevTools server](#frontend--devtools-server)
- [DevTools + VS Code integration](#devtools--vs-code-integration-ide-embedded-devtools-experience)
3. [Testing for DevTools](#testing-for-devtools)
4. [Appendix](#appendix)

## Developing for DevTools

### Set up your DevTools environment
Expand Down Expand Up @@ -100,9 +88,9 @@ of launch configurations for running and debugging DevTools:

### Workflow for making changes

1. Change your local Flutter SDK to the latest flutter candidate branch:
1. Ensure your local Flutter SDK, DevTools dependencies, and generated code are up-to-date:
```sh
dt update-flutter-sdk --update-on-path
dt sync --update-on-path
```
> Warning: this will delete any local changes in your Flutter SDK you checked out from git.

Expand All @@ -111,23 +99,18 @@ of launch configurations for running and debugging DevTools:
git checkout -b myBranch
```

3. Ensure your branch, dependencies, and generated code are up-to-date:
```sh
dt sync
```

4. Implement your changes, and commit to your branch:
3. Implement your changes, and commit to your branch:
```sh
git commit -m “description”
```
If your improvement is user-facing, [document it](packages/devtools_app/release_notes/README.md) in the same PR.

5. Push to your branch to GitHub:
4. Push to your branch to GitHub:
```sh
git push origin myBranch
```

6. Navigate to the [Pull Requests](https://github.com/flutter/devtools/pulls) tab in the main
5. Navigate to the [Pull Requests](https://github.com/flutter/devtools/pulls) tab in the main
[DevTools repo](https://github.com/flutter/devtools). You should see a popup to create a pull
request from the branch in your cloned repo to the DevTools `master` branch. Create a pull request.

Expand All @@ -137,9 +120,18 @@ request from the branch in your cloned repo to the DevTools `master` branch. Cre
```
dt sync
```
This will pull the latest code from the upstream DevTools, upgrade dependencies, and perform code generation.

- If you want to upgrade dependencies and re-generate code (like mocks), but do not want to merge `upstream/master`, instead run
This command will:
- pull the latest code from the upstream DevTools master branch
- update `tool/flutter-sdk` to the Flutter version DevTools is built and tested
with on the CI
- upgrade dependencies
- perform code generation

Optionally, pass the `--update-on-path` flag to also update your local Flutter SDK
git checkout along with the `tool/flutter-sdk`.

- If you want to upgrade dependencies and re-generate code (like mocks), but do
not want to merge `upstream/master` or update your Flutter SDK version, instead run
```
dt generate-code --upgrade
```
Expand All @@ -160,133 +152,14 @@ request from the branch in your cloned repo to the DevTools `master` branch. Cre

## Running and debugging DevTools

There are a few different environments that you may need to run DevTools in. After running DevTools
in one of the environments below, connect to a test application to debug DevTools runtime tooling
(the majority of DevTools tools). See the
[Connect DevTools to a test application](#connect-devtools-to-a-test-application) section below.

### Frontend only (most common)

Most of the time, you will not need to run DevTools with the DevTools server to test your changes.
You can run DevTools in debug mode as either a Flutter web or Flutter desktop app.

> Note: though DevTools is shipped as a Flutter Web app, we recommend developing as a Flutter
Desktop app whenever possible for a more efficient development workflow. Please see the
[running on Flutter desktop](#running-devtools-on-flutter-desktop) section below for instructions.

- To run DevTools as a Flutter web app **from VS Code**, run with the **devtools** configuration and the "Chrome" device
- To run with experiments enabled, run from VS Code with the **devtools + experiments** configuration
- To run DevTools as a Flutter web app **from the command line**, run `flutter run -d chrome`
- To run with experiments enabled, add the flag `--dart-define=enable_experiments=true`

### Frontend + DevTools server

To develop with a workflow that exercises the DevTools server <==> DevTools client connection,
you will need to perform the following set up steps (first time only).

1. Clone the [Dart SDK](https://github.com/dart-lang/sdk) fron GitHub.
2. The `LOCAL_DART_SDK` environment variable needs to point to this path: `export LOCAL_DART_SDK=/path/to/dart/sdk`

If you are also developing server side code (e.g. the `devtools_shared` package), you will need to add a
dependency override to `sdk/pkg/dds/pubspec.yaml`.

```yaml
dependency_overrides:
devtools_shared:
path: relative/path/to/devtools/packages/devtools_shared
```

Then you can run DevTools with the server by running the following from anywhere under the `devtools/` directory:
1. To run the DevTools web app in release mode, served with the DevTools server (this emulates the production environment):
```
dt serve
```
2. To run the DevTools web app in debug mode, with full debugging support, and with a connection to a live DevTools server:
```sh
dt run
```

Option 2 is useful for a quicker development cycle. The DevTools build time will be faster, and you will be
able to connect the DevTools web app to an IDE or another DevTools instance for debugging purposes.

To see the full list of arguments available for either command, please pass the `-h` flag.

### IDE-embedded DevTools experience

#### DevTools + VS Code integration

To test the integration with VS Code, you can set up the Dart VS Code extension to run DevTools
and the server from your local source code. Follow the
[Frontend + DevTools server](#frontend--devtools-server) setup instructions above, and make sure
you have version v3.47 or newer of the Dart extension for VS Code.

Open your VS Code settings (Run the **Preferences: Open User Settings (JSON)** command from the
command palette (`F1`)) and add the following to your settings:

```js
"dart.customDevTools": {
"path": "/absolute/path/to/devtools",
"env": {
"LOCAL_DART_SDK": "/absolute/path/to/sdk"
// Path to the Flutter SDK that will be used to build DevTools. This may
// be the path to the included Flutter SDK under the tool/ directory or
// the path to your local Flutter SDK git checkout.
"FLUTTER_ROOT": "/absolute/path/to/devtools/tool/flutter-sdk"
},
"args": [
// Arguments that will be passed along to the `dt serve` command.
],
},
```

This instructs VS Code to run the `dt serve` command instead of running `dart devtools`.
You must set the `LOCAL_DART_SDK` and `FLUTTER_ROOT` env variables correctly for the script to work.

Next, restart VS Code (or run the **Developer: Reload Window** command from the command palette (`F1`))
and DevTools will be run from your local source code. After making any code changes to DevTools or the
server, you will need to re-run the **Developer: Reload Window** command to rebuild and restart the server.

#### DevTools + IntelliJ integration

Follow instructions in the Flutter-IntelliJ repo's `CONTRIBUTING` guide: [#developing-with-local-devtools](https://github.com/flutter/flutter-intellij/blob/master/CONTRIBUTING.md#developing-with-local-devtools)
Please see [DEBUGGING.md]() for guidance on running and debugging DevTools.

## Testing for DevTools

Please see [TESTING.md](TESTING.md) for guidance on running and writing tests.
Please see [TESTING.md]() for guidance on running and writing tests.

## Appendix

### Connect DevTools to a test application

For working on most DevTools tools, a connection to a running Dart or Flutter app is required. Run any Dart or Flutter app of your choice to
connect it to DevTools. Consider running [veggieseasons](https://github.com/flutter/samples/tree/main/veggieseasons) or another Flutter sample since those apps have plenty of interesting
code to debug.
1. Run your Dart or Flutter app.
> Note: some DevTools features may be unavailable depending on the test app platform (Flutter native, Flutter web, Dart CLI, etc.) or run mode
(debug, profile) you choose.
2. Copy the URI printed to the command line (you will use this URI to connect to DevTools).

```
"A Dart VM Service on iPhone 14 Pro Max is available at: <copy-this-uri>"
```
3. Paste this URI into the connect dialog in DevTools and click "Connect".

![Connect dialog example](_markdown_images/connect_dialog_example.png)

### Running DevTools on Flutter Desktop

For a faster development cycle with hot reload, you can run DevTools on Flutter desktop. Some DevTools
features only work on the web, like the embedded Perfetto trace viewer, DevTools extensions, or WASM support,
but the limitations on the desktop app are few.

To run DevTools with the desktop embedder, you can run `flutter run -d macos` from `devtools/packages/devtools_app`,
or you can run DevTools from your IDE with the `macOS` device selected.

If this fails, you may need to run `flutter create .` from `devtools/packages/devtools_app` to generate
the updated files for your platform. If you want to run DevTools on Flutter desktop for Windows or Linux,
you will need to generate the files for this platform using the `flutter create .` command, and then run using
`flutter run -d <windows or linux>`.

### Enable and activate DCM (Dart Code Metrics)

Enabling and activating DCM is optional. When you open a PR, the CI bots will show you any DCM warnings introduced
Expand Down
Loading