You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User copies the DevTools URL and pastes it into a new tab. There are now two DevTools app clients connected to the DevTools server.
In the second instance of DevTools app, the user disconnects DevTools from app FOO, and connects DevTools to a different Dart or Flutter app (BAR).
Issue: DevTools app (instance 2) sets the workspace directories for DTD, but now the workspace directories apply to both DevTools app client connections. Meaning the workspace directories will be incorrect for the DevTools instance connected to app FOO.
Proposal
Create contexts on the DevTools server for each VM service connection. When a DevTools client connects to a VM service, DevTools app can post an event to DevTools server. At this time, DevTools server can create a "context" for the new VM service connection, or use an existing one if one exists.
By "context" in this case, I mean DevTools server should keep VM-specific data separated by VM service connection. An example for the DTD scenario above could look like this:
A user runs an app FOO from the command line.
DevTools server is started.
User opens the DevTools link printed to command line.
DevTools app sends an event to the DevTools server notifying of the VM service connection in the client.
DevTools server stores the VM service URI, spins up a DTD instance for this "context" and can set the workspace roots for DTD by connecting to the VM service to detect them.
User copies the DevTools URL and pastes it into a new tab. There are now two DevTools app clients connected to the DevTools server.
DevTools app sends an event to the DevTools server notifying of the VM service connection in the client (instance 2).
Since DevTools server already has a "context" for this VM service connection, it does nothing and re-uses the existing client.
In the second instance of DevTools app, the user disconnects DevTools from app FOO, and connects DevTools to a different Dart or Flutter app (BAR).
DevTools app sends an event to the DevTools server notifying of the VM service connection in the client. DevTools server does not have a "context" for this VM service, so it repeats the steps it took for the first VM service client. It stores the VM service URI, spins up a DTD instance for this "context" and can set the workspace roots for DTD by connecting to the VM service to detect them.
The text was updated successfully, but these errors were encountered:
lrhn
added
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
pkg-dds
For issues related to the Dart Development Service
labels
Feb 29, 2024
DevTools server has a one-to-many relationship with DevTools app clients. Each client can be connected to a different VM service connection.
This will cause issues for cases where we are setting information on the server that is specific to a single VM service connection.
One example is the case where DTD is started by DevTools server (in progress here: https://dart-review.googlesource.com/c/sdk/+/354460).
Imagine this scenario:
Proposal
Create contexts on the DevTools server for each VM service connection. When a DevTools client connects to a VM service, DevTools app can post an event to DevTools server. At this time, DevTools server can create a "context" for the new VM service connection, or use an existing one if one exists.
By "context" in this case, I mean DevTools server should keep VM-specific data separated by VM service connection. An example for the DTD scenario above could look like this:
The text was updated successfully, but these errors were encountered: