Commit 56585774 authored by Devon Carew's avatar Devon Carew Committed by GitHub

pass through the ws debugging uri (#6989)

parent 4a7531da
......@@ -358,7 +358,10 @@ class AppDomain extends Domain {
if (options.debuggingEnabled) {
connectionInfoCompleter = new Completer<DebugConnectionInfo>();
connectionInfoCompleter.future.then((DebugConnectionInfo info) {
Map<String, dynamic> params = <String, dynamic>{ 'port': info.port };
Map<String, dynamic> params = <String, dynamic>{
'port': info.port,
'wsUri': info.wsUri
};
if (info.baseUri != null)
params['baseUri'] = info.baseUri;
_sendAppEvent(app, 'debugPort', params);
......
......@@ -237,7 +237,11 @@ class HotRunner extends ResidentRunner {
Uri baseUri = await _initDevFS();
if (connectionInfoCompleter != null) {
connectionInfoCompleter.complete(
new DebugConnectionInfo(_observatoryPort, baseUri: baseUri.toString())
new DebugConnectionInfo(
port: _observatoryPort,
wsUri: 'ws://localhost:$_observatoryPort/ws',
baseUri: baseUri.toString()
)
);
}
} catch (error) {
......
......@@ -271,8 +271,9 @@ String getMissingPackageHintForPlatform(TargetPlatform platform) {
}
class DebugConnectionInfo {
DebugConnectionInfo(this.port, { this.baseUri });
DebugConnectionInfo({ this.port, this.wsUri, this.baseUri });
final int port;
final String wsUri;
final String baseUri;
}
......@@ -119,8 +119,13 @@ class RunAndStayResident extends ResidentRunner {
startTime.stop();
if (_result.hasObservatory)
connectionInfoCompleter?.complete(new DebugConnectionInfo(_result.observatoryPort));
if (_result.hasObservatory) {
int port = _result.observatoryPort;
connectionInfoCompleter?.complete(new DebugConnectionInfo(
port: port,
wsUri: 'ws://localhost:$port/ws'
));
}
// Connect to observatory.
if (debuggingOptions.debuggingEnabled) {
......
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