Skip to content

Commit 2836ccd

Browse files
authored
Adding more details on opening DevTools (#13248)
Fixes #13245 A developer was confused on how to open DevTools from the command line.
1 parent 7bd99b0 commit 2836ccd

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

src/content/learn/pathway/tutorial/devtools.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ description: Learn to use the Dart DevTools when developing Flutter apps.
44
layout: tutorial
55
---
66

7-
Learn to use the widget inspector and property editor to debug layout issues and experiment with properties in real-time.
7+
Learn to use the widget inspector and property editor to debug layout issues
8+
and experiment with properties in real-time.
89

9-
<YouTubeEmbed id="CIfLE0CShbg" title="Intro to Flutter and Dart DevTools" fullWidth="true"></YouTubeEmbed>
10+
<YouTubeEmbed id="CIfLE0CShbg" title="Intro to Flutter and Dart DevTools"
11+
fullWidth="true"></YouTubeEmbed>
1012

1113
<SummaryCard>
1214
title: What you'll accomplish
@@ -30,20 +32,32 @@ two particularly useful features:
3032
the **widget inspector** and the **property editor**.
3133

3234
First, launch DevTools by running the following commands while
33-
your app is running in debug mode:
35+
your app is running in debug mode.
36+
Run this command in a **separate terminal window**
37+
from where your app is running:
3438

3539
```console
3640
$ dart devtools
3741
```
3842

43+
Running this command starts the DevTools server and
44+
opens the interface in a browser.
45+
46+
To connect DevTools to your running app:
47+
48+
1. Find the DevTools URL printed in the terminal
49+
where your app is running (for example:
50+
`Serving DevTools at http://127.0.0.1:9101`).
51+
2. Copy this URL.
52+
3. Paste it into the connect bar in the DevTools browser page.
53+
3954
:::note Run in your IDE
4055

4156
Provided you have the appropriate Flutter plugin installed,
4257
you can also run DevTools directly inside
4358
Code OSS-based editors such as [VS Code][] as well as
4459
[IntelliJ and Android Studio][].
4560
The screenshots in this lesson are from VS Code.
46-
4761
:::
4862

4963
[Dart and Flutter DevTools]: /tools/devtools
@@ -57,7 +71,8 @@ It helps you understand the layout of your UI and
5771
identifies which widgets are responsible for different parts of the screen.
5872
Running against the app you've built so far, the inspector looks like this:
5973

60-
<img src='/assets/images/docs/tutorial/widget_inspector.png' width="320px" alt="A screenshot of the Flutter widget inspector tool.">
74+
<img src='/assets/images/docs/tutorial/widget_inspector.png'
75+
width="320px" alt="A screenshot of the Flutter widget inspector tool.">
6176

6277
Consider the `GamePage` widget you created in this section:
6378

@@ -144,7 +159,8 @@ This error is referred to as the "unbounded constraints" error.
144159
Watch the following video to get an understanding of how to
145160
spot and resolve this issue.
146161

147-
<YouTubeEmbed id="jckqXR5CrPI" title="Decoding Flutter: Unbounded height and width"></YouTubeEmbed>
162+
<YouTubeEmbed id="jckqXR5CrPI"
163+
title="Decoding Flutter: Unbounded height and width"></YouTubeEmbed>
148164

149165
[constraints]: /ui/layout/constraints
150166
[`double.infinity`]: {{site.api}}/flutter/dart-core/double/infinity-constant.html
@@ -160,7 +176,8 @@ the property editor displays all the properties of that selected widget.
160176
This is a powerful tool for understanding why a widget looks the way it does and
161177
for experimenting with property value changes in real-time.
162178

163-
<img src='/assets/images/docs/tutorial/property_editor.png' width="320px" alt="A screenshot of the Flutter property editor tool.">
179+
<img src='/assets/images/docs/tutorial/property_editor.png'
180+
width="320px" alt="A screenshot of the Flutter property editor tool.">
164181

165182
Look at the `Tile` widget's `build` method from earlier:
166183

src/content/learn/pathway/tutorial/navigation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ description: Learn how to navigate from one page to another in a Flutter app.
44
layout: tutorial
55
---
66

7-
Learn to navigate between screens with Navigator.push and implement adaptive navigation patterns for different screen sizes.
7+
Learn to navigate between screens with Navigator.push and implement
8+
adaptive navigation patterns for different screen sizes.
89

910
<SummaryCard>
1011
title: What you'll accomplish

0 commit comments

Comments
 (0)