Skip to content

[Widget previews] Report the Flutter Tool PID when running flutter widget-preview start --machine #175002

@bkonyi

Description

@bkonyi

From #173616 (comment):

I verified that we are indeed disposing the preview process from Dart-Code, however while reviewing the logs I remembered something... We're spawning the flutter.bat process on Windows, so the process we are killing is not the Dart VM, but the shell that wraps it. And we've found this to be really unreliable for passing the signal on.

So almost all of our other Flutter process, we have them emit their pid in the JSON at startup, and we terminate that PID instead.

Is it possible we can have the preview server emit it's PID in a json message too? Ideally immediately (not after scanning the project for previews) just so we have it earlier, in case the user shuts down VS Code while it was still scanning.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingteam-toolOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions