diff --git a/src/chromeDebug.ts b/src/chromeDebug.ts index cf740c6..c273285 100644 --- a/src/chromeDebug.ts +++ b/src/chromeDebug.ts @@ -2,7 +2,7 @@ * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ -import {ChromeDebugSession, logger, ChromeConnection, UrlPathTransformer, BaseSourceMapTransformer} from 'vscode-chrome-debug-core'; +import {ChromeDebugSession, logger, UrlPathTransformer, BaseSourceMapTransformer} from 'vscode-chrome-debug-core'; import * as path from 'path'; import {ChromeDebugAdapter} from './chromeDebugAdapter'; @@ -14,13 +14,13 @@ const targetFilter = target => target && (!target.type || target.type === 'page' // Cast because DebugSession is declared twice - in this repo's vscode-debugadapter, and that of -core... TODO ChromeDebugSession.run(ChromeDebugSession.getSession( { - logFilePath: path.resolve(__dirname, '../../vscode-chrome-debug.txt'), // non-.txt file types can't be uploaded to github adapter: ChromeDebugAdapter, extensionName: EXTENSION_NAME, + logFilePath: path.resolve(__dirname, '../../vscode-chrome-debug.txt'), // non-.txt file types can't be uploaded to github targetFilter, pathTransformer: UrlPathTransformer, - sourceMapTransformer: BaseSourceMapTransformer + sourceMapTransformer: BaseSourceMapTransformer, })); /* tslint:disable:no-var-requires */ diff --git a/src/chromeDebugAdapter.ts b/src/chromeDebugAdapter.ts index 55e75cb..8211ae7 100644 --- a/src/chromeDebugAdapter.ts +++ b/src/chromeDebugAdapter.ts @@ -10,7 +10,7 @@ import * as utils from './utils'; const DefaultWebsourceMapPathOverrides: ISourceMapPathOverrides = { 'webpack:///*': '${webRoot}/*', - 'meteor://💻app/*': '${webRoot}/*' + 'meteor://💻app/*': '${webRoot}/*', }; export class ChromeDebugAdapter extends CoreDebugAdapter { @@ -53,7 +53,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter { logger.log(`spawn('${chromePath}', ${JSON.stringify(chromeArgs) })`); this._chromeProc = spawn(chromePath, chromeArgs, { detached: true, - stdio: ['ignore'] + stdio: ['ignore'], }); this._chromeProc.unref(); this._chromeProc.on('error', (err) => { diff --git a/src/utils.ts b/src/utils.ts index 0570b16..7803d00 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -7,11 +7,11 @@ import {utils as coreUtils} from 'vscode-chrome-debug-core'; const WIN_APPDATA = process.env.LOCALAPPDATA || '/'; const DEFAULT_CHROME_PATH = { + LINUX: '/usr/bin/google-chrome', OSX: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', WIN: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe', - WINx86: 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe', WIN_LOCALAPPDATA: path.join(WIN_APPDATA, 'Google\\Chrome\\Application\\chrome.exe'), - LINUX: '/usr/bin/google-chrome' + WINx86: 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe', }; export function getBrowserPath(): string { diff --git a/test/chromeDebugAdapter.test.ts b/test/chromeDebugAdapter.test.ts index 56ced50..f51b95b 100644 --- a/test/chromeDebugAdapter.test.ts +++ b/test/chromeDebugAdapter.test.ts @@ -25,8 +25,6 @@ class MockChromeDebugSession { const MODULE_UNDER_TEST = '../src/chromeDebugAdapter'; suite('ChromeDebugAdapter', () => { - const ATTACH_ARGS = { port: 9222 }; - let mockChromeConnection: Mock; let mockEventEmitter: EventEmitter;