Skip to content

Commit f797b00

Browse files
Add connection instructions for Flutter app (#96)
Added instructions for connecting to a running Flutter app using the Dart Tooling Daemon. fixes #94 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 04bf0a6 commit f797b00

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,32 @@ This extension enforces a specific set of coding standards to ensure consistency
115115
- **`flutter.md`**: Contains rules and best practices for writing Dart and Flutter code. These rules are opinionated, and we encourage you to review them to ensure they align with your style.
116116
- **`override`**: Contains important, high-priority rules that are appended to the end of all prompts to ensure they have the most weight.
117117

118+
## Connecting to a running app
119+
You can connect to an app by providing the Flutter extension with the URL for
120+
the Dart Tooling Daemon:
121+
122+
1. **Run the app**: in VSCode on a target device (iOS, Android, macOS, or web)
123+
2. **Execute the Copy DTD Uri action**: Open the VSCode Command Runner
124+
(Cmd+Shift+P, or Ctrl+Shift+P) and type "Copy DTD Uri to Clipboard" to copy the
125+
DTD URL to your clipboard
126+
3. **Paste the URL into Gemini CLI**: Enter a prompt like "Connect to the
127+
Flutter app with this DTD URL: " and paste the URL from your clipboard. You
128+
should see a "Connection succeeded" message from the
129+
connect_dart_tooling_daemon MCP tool.
130+
131+
Alternatively, you can run from the command line with the `--print-dtd` flag:
132+
133+
```
134+
$ flutter run --print-dtd
135+
...
136+
The Dart Tooling Daemon is available at: ws://127.0.0.1:52636/M3G9d1Q3hFk=
137+
```
138+
139+
To learn more about the Dart and Flutter MCP server, see the
140+
[Dart and Flutter MCP server](https://dart.dev/tools/mcp-server)
141+
page on dart.dev or the
142+
[dart_mcp_server README](https://github.com/dart-lang/ai/tree/main/pkgs/dart_mcp_server).
143+
118144
## Known issues
119145

120146
* Running a Flutter app from within Gemini CLI and then triggering a Hot Reload

0 commit comments

Comments
 (0)