Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Switching to JS file while Live Development is connecting causes it to fail #5110

@peterflynn

Description

@peterflynn

I could swear we fixed a bug just like this recently, but this occurs for me on master now...

  1. Open an HTML file and a JS file in the working set
  2. Go to the HTML file and click the Live Preview lightning bolt
  3. While Chrome is launching, switch to the JS file

Result:
Chrome stays on the gray "interstitial" page forever, and Brackets eventually shows a connection error dialog.

Expected:
Should still connect, since I was on a valid HTML file when I originally clicked it.
And if I wait on the HTML file until the connection succeeds, switching to the JS file at that point doesn't cause it to disconnect... so we're putting the user in a sort of race condition.

This is easy to hit if you're using Live Preview but what you actually want to work on is a CSS or JS file. You can't launch it from the file you're in (because of the "you must select an HTML file first" issue), so you quickly switch to the HTML file and then back to the file you actually care about.

Also, it's easier to hit on Win than Mac, because every Live Preview invocation means waiting for an instance of Chrome to launch from scratch -- much longer time period in which to hit the bug.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions