This commit is contained in:
Marvin Hagemeister 2016-10-05 23:20:42 +02:00
Родитель a7cc43305c
Коммит 87fcbaa8c7
4 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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) => {

Просмотреть файл

@ -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 {

Просмотреть файл

@ -25,8 +25,6 @@ class MockChromeDebugSession {
const MODULE_UNDER_TEST = '../src/chromeDebugAdapter';
suite('ChromeDebugAdapter', () => {
const ATTACH_ARGS = { port: 9222 };
let mockChromeConnection: Mock<ChromeConnection>;
let mockEventEmitter: EventEmitter;