Skip to content

Commit 6d6fbe8

Browse files
Merge pull request #2392 from NativeScript/KristinaKoeva/Chrome
Open specific version of Chrome Dev Tools
2 parents 052a397 + 9df13ef commit 6d6fbe8

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";
@@ -236,7 +237,7 @@ class AndroidDebugService implements IDebugService {
236237

237238
private startDebuggerClient(port: Number): IFuture<void> {
238239
return (() => {
239-
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`);
240+
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);
240241
}).future<void>()();
241242
}
242243

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

@@ -203,7 +204,8 @@ class IOSDebugService implements IDebugService {
203204
if (this.$options.chrome) {
204205
this._socketProxy = this.$socketProxyFactory.createWebSocketProxy(factory);
205206

206-
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`);
207+
const commitSHA = "02e6bde1bbe34e43b309d4ef774b1168d25fd024"; // corresponds to 55.0.2883 Chrome version
208+
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);
207209
} else {
208210
this._socketProxy = this.$socketProxyFactory.createTCPSocketProxy(factory);
209211
this.openAppInspector(this._socketProxy.address()).wait();

0 commit comments

Comments
 (0)