pass through the ws debugging uri (#6989)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user