Skip to content

Commit 4876ada

Browse files
committed
Open specific version of Chrome Dev Tools
Otherwise we would have to update our logic on every Chrome update
1 parent 918443d commit 4876ada

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/services/android-debug-service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as net from "net";
2+
import * as os from "os";
23
import Future = require("fibers/future");
34
import { sleep } from "../common/helpers";
45
import {ChildProcess} from "child_process";
@@ -232,7 +233,7 @@ class AndroidDebugService implements IDebugService {
232233

233234
private startDebuggerClient(port: Number): IFuture<void> {
234235
return (() => {
235-
this.$logger.info(`To start debugging, open the following URL in Chrome:\nchrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:${port}\n`);
236+
this.$logger.info(`To start debugging, open the following URL in Chrome:${os.EOL}chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:${port}${os.EOL}`.cyan);
236237
}).future<void>()();
237238
}
238239

lib/services/ios-debug-service.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as iOSDevice from "../common/mobile/ios/device/ios-device";
22
import * as net from "net";
33
import * as path from "path";
44
import * as log4js from "log4js";
5+
import * as os from "os";
56
import {ChildProcess} from "child_process";
67
import byline = require("byline");
78

@@ -195,7 +196,8 @@ class IOSDebugService implements IDebugService {
195196
if (this.$options.chrome) {
196197
this._socketProxy = this.$socketProxyFactory.createWebSocketProxy(factory);
197198

198-
this.$logger.info(`To start debugging, open the following URL in Chrome:\nchrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:${this._socketProxy.options.port}\n`);
199+
const commitSHA = "02e6bde1bbe34e43b309d4ef774b1168d25fd024"; // corresponds to 55.0.2883 Chrome version
200+
this.$logger.info(`To start debugging, open the following URL in Chrome:${os.EOL}chrome-devtools://devtools/remote/serve_file/@${commitSHA}/inspector.html?experiments=true&ws=localhost:${this._socketProxy.options.port}${os.EOL}`.cyan);
199201
} else {
200202
this._socketProxy = this.$socketProxyFactory.createTCPSocketProxy(factory);
201203
this.openAppInspector(this._socketProxy.address()).wait();

0 commit comments

Comments
 (0)