diff --git a/package.json b/package.json index fcd4144a..d1409b83 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ ], "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { - "vscode-chrome-debug-core": "3.15.9", + "vscode-chrome-debug-core": "3.16.0", "vscode-debugadapter": "1.19.0" }, "devDependencies": { diff --git a/src/chromeDebug.ts b/src/chromeDebug.ts index b2c3317a..a8dd8c33 100644 --- a/src/chromeDebug.ts +++ b/src/chromeDebug.ts @@ -4,6 +4,7 @@ import {ChromeDebugSession, logger, UrlPathTransformer, BaseSourceMapTransformer} from 'vscode-chrome-debug-core'; import * as path from 'path'; +import * as os from 'os'; import {targetFilter} from './utils'; import {ChromeDebugAdapter} from './chromeDebugAdapter'; @@ -16,7 +17,7 @@ let versionWithDefault = typeof VERSION === 'undefined' ? 'unspecified' : VERSIO // non-.txt file types can't be uploaded to github // also note that __dirname here is out/ -const logFilePath = path.resolve(__dirname, '../vscode-chrome-debug.txt'); +const logFilePath = path.resolve(os.tmpdir(), 'vscode-chrome-debug.txt'); // Start a ChromeDebugSession configured to only match 'page' targets, which are Chrome tabs. // Cast because DebugSession is declared twice - in this repo's vscode-debugadapter, and that of -core... TODO diff --git a/src/chromeDebugAdapter.ts b/src/chromeDebugAdapter.ts index 7089abce..cabf1be4 100644 --- a/src/chromeDebugAdapter.ts +++ b/src/chromeDebugAdapter.ts @@ -86,7 +86,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter { }); return args.noDebug ? undefined : - this.doAttach(port, launchUrl || args.urlFilter, args.address, args.timeout); + this.doAttach(port, launchUrl || args.urlFilter, args.address, args.timeout, undefined, args.extraCRDPChannelPort); }); } @@ -111,8 +111,8 @@ export class ChromeDebugAdapter extends CoreDebugAdapter { super.commonArgs(args); } - protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise { - return super.doAttach(port, targetUrl, address, timeout).then(() => { + protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number, websocketUrl?: string, extraCRDPChannelPort?: number): Promise { + return super.doAttach(port, targetUrl, address, timeout, websocketUrl, extraCRDPChannelPort).then(() => { // Don't return this promise, a failure shouldn't fail attach this.globalEvaluate({ expression: 'navigator.userAgent', silent: true }) .then( diff --git a/test/chromeDebugAdapter.test.ts b/test/chromeDebugAdapter.test.ts index b8064140..2c70bc8e 100644 --- a/test/chromeDebugAdapter.test.ts +++ b/test/chromeDebugAdapter.test.ts @@ -108,7 +108,7 @@ suite('ChromeDebugAdapter', () => { require('fs').statSync = () => true; mockChromeConnection - .setup(x => x.attach(It.isValue(undefined), It.isAnyNumber(), It.isAnyString(), It.isValue(undefined))) + .setup(x => x.attach(It.isValue(undefined), It.isAnyNumber(), It.isAnyString(), It.isValue(undefined), It.isValue(undefined))) .returns(() => Promise.resolve()) .verifiable();