Skip to content
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

Update build steps to enable desktop use case. #6300

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 36 additions & 19 deletions BETA_TESTING.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,64 @@
# Beta testing
# Build DevTools

This page describes the fastest way to test the latest version of DevTools with all experemental features enabled. Do not mix this setup with development environment.
This page describes the fastest way to build DevTools with the goal to use it. Do not mix this setup with development environment. If you want to make code changes, follow [contributing guidance](https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md).

If you want to make code changes, follow [contributing guidance](https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md).
You may want to build DevTools to:

The steps were tested for Mac. They may require adjustments for other platforms.
1. Try experimental features

2. Run desktop version, instead of Web version, to get get rid of browser memory limit. For example,
to be able to analyze heap snapshots of more complicated applications.

These steps were tested for Mac and may require adjustments for other platforms. Contributions
that make the steps more platform agnostic are welcome.

## Prerequisites

1. [Configure](https://docs.flutter.dev/get-started/install) Dart or Flutter.

## Setup and start
## Setup DevTools (first time only)

1. In your terminal `cd` to a folder where you want to clone devtools, and that does not have subfolder `devtools` yet.

2. Clone the repo, get needed Flutter version to local folder and start DevTools:
2. Clone the repo and update the Flutter SDK that DevTools will be built with:

```bash
git clone https://github.com/flutter/devtools.git

./devtools/tool/update_flutter_sdk.sh

cd devtools/packages/devtools_app
../../tool/flutter-sdk/bin/flutter run -d chrome --dart-define=enable_experiments=true
bash devtools/tool/update_flutter_sdk.sh
cd devtools
```

3. Paste the URL of your application (for example [Gallery](https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md#connect-to-application)) to the connection textbox.
## Or refresh DevTools

## Refresh and start
If you have already configured the DevTools environment and need to refresh to get the latest DevTools code, follow these instructions:

1. `cd` to the `devtools` directory created in the [Setup and start](#setup-and-start) section.

2. Refresh and run DevTools (it will delete all your local changes!):
2. Refresh DevTools (it will delete all your local changes!):

```bash
git checkout master
git reset --hard origin/master

./tool/update_flutter_sdk.sh
cd packages/devtools_app
../../tool/flutter-sdk/bin/flutter pub upgrade

../../tool/flutter-sdk/bin/flutter run -d chrome --dart-define=enable_experiments=true
bash tool/update_flutter_sdk.sh
bash tool/upgrade.sh
```

3. Paste the URL of your application (for example [Gallery](https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md#connect-to-application)) to the connection textbox.
If some steps failed, remove the directory and redo to [Setup](#setup).

## Start DevTools and connect to an app

1. From the main devtools directory, run `cd packages/devtools_app``

2. Start DevTools

- On Chrome: `../../tool/flutter-sdk/bin/flutter run --release -d chrome`
- On Mac: `../../tool/flutter-sdk/bin/flutter run --release -d macos`
- On Windows: `../../tool/flutter-sdk/bin/flutter run --release -d windows`

Add `--dart-define=enable_experiments=true` to enable experimental features.

3. Paste the URL of your application
(for example [Gallery](https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md#connect-to-application))
to the connection textbox.