Commit b265a8f5 authored by Dan Rubel's avatar Dan Rubel Committed by GitHub

setup protocol discovery before launching simulator (#7172)

parent adf998cb
......@@ -452,6 +452,10 @@ class IOSSimulator extends Device {
args.add("--observatory-port=$observatoryPort");
}
ProtocolDiscovery observatoryDiscovery;
if (debuggingOptions.debuggingEnabled)
observatoryDiscovery = new ProtocolDiscovery.observatory(getLogReader(app: app));
// Launch the updated application in the simulator.
try {
SimControl.instance.launch(id, app.id, args);
......@@ -468,7 +472,6 @@ class IOSSimulator extends Device {
// device has printed "Observatory is listening on..."
printTrace('Waiting for observatory port to be available...');
ProtocolDiscovery observatoryDiscovery = new ProtocolDiscovery.observatory(getLogReader(app: app));
try {
Uri deviceUri = await observatoryDiscovery.nextUri();
return new LaunchResult.succeeded(observatoryUri: deviceUri);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment