Skip to content

fix(devtools): stop DevTools server on flutter shutdown#521

Open
josephemorgan wants to merge 1 commit intonvim-flutter:mainfrom
josephemorgan:main
Open

fix(devtools): stop DevTools server on flutter shutdown#521
josephemorgan wants to merge 1 commit intonvim-flutter:mainfrom
josephemorgan:main

Conversation

@josephemorgan
Copy link
Copy Markdown
Contributor

on_flutter_shutdown() only cleared profiler_url and devtools_profiler_url but left devtools_url, devtools_pid, and the DevTools server process alive. After quit and relaunch in debug mode, the stale devtools_url caused the browser to open with the old port instead of the new one.

Call M.stop() in on_flutter_shutdown() to kill the DevTools process and clear all state so the next launch starts fresh.

fixes #520 (comment)

on_flutter_shutdown() only cleared profiler_url and
devtools_profiler_url but left devtools_url, devtools_pid, and the
DevTools server process alive. After quit and relaunch in debug mode,
the stale devtools_url caused the browser to open with the old port
instead of the new one.

Call M.stop() in on_flutter_shutdown() to kill the DevTools process
and clear all state so the next launch starts fresh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DevTools opens browser with stale port after quit and relaunch in debug mode

1 participant