提交 a9ed1f02 编写于 作者: A Andre Weinand

fix review feedback

上级 1627a34e
......@@ -76,7 +76,7 @@ export const debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerE
type: 'array'
},
adapterExecutableCommand: {
description: nls.localize('vscode.extension.contributes.debuggers.adapterExecutableCommand', "If specified VS Code will call this command to determine the executable path of the debug adapter and the argumnts to pass."),
description: nls.localize('vscode.extension.contributes.debuggers.adapterExecutableCommand', "If specified VS Code will call this command to determine the executable path of the debug adapter and the arguments to pass."),
type: 'string'
},
startSessionCommand: {
......
......@@ -430,7 +430,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
}
private startServer(): TPromise<any> {
return this.adapter.getAdapterExecutable().then(d => this.launchServer(d).then(() => {
return this.adapter.getAdapterExecutable().then(ae => this.launchServer(ae).then(() => {
this.serverProcess.on('error', (err: Error) => this.onServerError(err));
this.serverProcess.on('exit', (code: number, signal: string) => this.onServerExit());
......
......@@ -3,13 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import fs = require('fs');
import * as nls from 'vs/nls';
import { TPromise } from 'vs/base/common/winjs.base';
import * as strings from 'vs/base/common/strings';
import * as objects from 'vs/base/common/objects';
import * as paths from 'vs/base/common/paths';
import * as platform from 'vs/base/common/platform';
import fs = require('fs');
import { IJSONSchema, IJSONSchemaSnippet } from 'vs/base/common/jsonSchema';
import { IRawAdapter, IAdapterExecutable } from 'vs/workbench/parts/debug/common/debug';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
......@@ -37,17 +37,17 @@ export class Adapter {
});
}
const ad = <IAdapterExecutable>{
const adapterExecutable = <IAdapterExecutable>{
command: this.getProgram(),
args: this.getAttributeBasedOnPlatform('args')
};
const runtime = this.getRuntime();
if (runtime) {
const runtimeArgs = this.getAttributeBasedOnPlatform('runtimeArgs');
ad.args = (runtimeArgs || []).concat([ad.command]).concat(ad.args || []);
ad.command = runtime;
adapterExecutable.args = (runtimeArgs || []).concat([adapterExecutable.command]).concat(adapterExecutable.args || []);
adapterExecutable.command = runtime;
}
return this.verifyAdapterDetails(ad, verifyAgainstFS);
return this.verifyAdapterDetails(adapterExecutable, verifyAgainstFS);
}
private verifyAdapterDetails(details: IAdapterExecutable, verifyAgainstFS: boolean): TPromise<IAdapterExecutable> {
......
......@@ -6,9 +6,9 @@
import * as assert from 'assert';
import * as paths from 'vs/base/common/paths';
import * as platform from 'vs/base/common/platform';
import { IRawAdapter } from 'vs/workbench/parts/debug/common/debug';
import { Adapter } from 'vs/workbench/parts/debug/node/debugAdapter';
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import debug = require('vs/workbench/parts/debug/common/debug');
suite('Debug - Adapter', () => {
let adapter: Adapter;
......@@ -77,7 +77,7 @@ suite('Debug - Adapter', () => {
test('merge', () => {
const da: debug.IRawAdapter = {
const da: IRawAdapter = {
type: 'mock',
win: {
runtime: 'winRuntime'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册