flutter / flutter/devtools

Devtools does not work in Github Codespaces

Offen
#6,160 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
new feature P2
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

## Overview
I am trying to use Flutter in a Github Codespaces environment (I got similar results with GCP Managed Workstations environment too) where I am unable to get devtools to work in this environment.

I have the Chrome extension installed and you can see below in a video where I cover the bug from start to finish that it worked fine and even reported that it was working successfully. However, in practice it never loads the application and VSCode still says that it is waiting for me to click the button.

## Video Walkthrough
I put together a short 2-3 min example that covers everything from start to finish

[![Watch the video](https://i9.ytimg.com/vi/7vYeBG3izaM/mq3.jpg?sqp=CNj-uqYG-oaymwEmCMACELQB8quKqQMa8AEB-AHUBoAC4AOKAgwIABABGH8gNig6MA8%3D&rs=AOn4CLDOJPv7uxNQu7HG3xSAfdQPQ9AIww&retry=4)](https://www.youtube.com/watch?v=7vYeBG3izaM)

## Logs from video walkthrough
These are the same logs that came from the video above

- [Dart-Code-Log.txt](https://github.com/flutter/devtools/files/12268246/flutter-logs.txt)

## launch.json file
```json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "My App",
"request": "launch",
"type": "dart",
"args": ["--web-hostname=0.0.0.0", "--web-port=3000"]
},
{
"name": "My App (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args": ["--web-hostname=0.0.0.0", "--web-port=3000"]
},
{
"name": "My App (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release",
"args": ["--web-hostname=0.0.0.0", "--web-port=3000"]
}
]
}
```

## Flutter Doctor
![image](https://github.com/flutter/devtools/assets/76698672/9bf32e56-1814-4021-9547-ecfc58e24b25)

## install-flutter.sh
I have a simple script to install Flutter into the container I am using as my environment that contains the following and helps give some context as to how specifically Flutter is installed into the environment

```sh
#!/usr/bin/env bash
set -e

# Install Flutter
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.10.6-stable.tar.xz -O /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C $HOME
```

### Other Potentially Useful / Linked Issues
- https://github.com/flutter/flutter/issues/89721 (This would be a huge amount of help to have a solution even if not officially supported that worked)
- https://github.com/DanTup/github-codespaces-flutter-web (This one from DanTup is a bit old and uses a different web-hostname argument which I also tried without any luck)
- https://docs.flutter.dev/tools/devtools/vscode#launch-devtools (It would be great if we could include remote development specifics here in the docs)

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with the attached Dart-Code-Log.txt and the launch.json configuration, then reproduce the reported behavior in GitHub Codespaces using the provided install-flutter.sh script. Done means DevTools loads the application successfully and VSCode no longer waits for the user to click the button.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart, github, vscode
Bereich
developer-experience, devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
28/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.