diff --git a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts index 5751daf0cb2..275bbcc3300 100644 --- a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts +++ b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts @@ -105,25 +105,25 @@ export class ConfigurationManager implements IConfigurationManager { } createDebugAdapter(session: IDebugSession): IDebugAdapter | undefined { - let dap = this.debugAdapterFactories.get(session.configuration.type); - if (dap) { - return dap.createDebugAdapter(session); + let factory = this.debugAdapterFactories.get(session.configuration.type); + if (factory) { + return factory.createDebugAdapter(session); } return undefined; } substituteVariables(debugType: string, folder: IWorkspaceFolder | undefined, config: IConfig): Promise { - let dap = this.debugAdapterFactories.get(debugType); - if (dap) { - return dap.substituteVariables(folder, config); + let factory = this.debugAdapterFactories.get(debugType); + if (factory) { + return factory.substituteVariables(folder, config); } return Promise.resolve(config); } runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments): Promise { - let tl = this.debugAdapterFactories.get(debugType); - if (tl) { - return tl.runInTerminal(args); + let factory = this.debugAdapterFactories.get(debugType); + if (factory) { + return factory.runInTerminal(args); } return Promise.resolve(void 0); } diff --git a/src/vs/workbench/contrib/debug/common/debugger.ts b/src/vs/workbench/contrib/debug/common/debugger.ts index ca1ee7ebfc3..f467b6e4cbd 100644 --- a/src/vs/workbench/contrib/debug/common/debugger.ts +++ b/src/vs/workbench/contrib/debug/common/debugger.ts @@ -58,19 +58,21 @@ export class Debugger implements IDebugger { if (isObject(source)) { Object.keys(source).forEach(key => { - if (isObject(destination[key]) && isObject(source[key])) { - mixin(destination[key], source[key], overwrite, level + 1); - } else { - if (key in destination) { - if (overwrite) { - if (level === 0 && key === 'type') { - // don't merge the 'type' property - } else { - destination[key] = source[key]; - } - } + if (key !== '__proto__') { + if (isObject(destination[key]) && isObject(source[key])) { + mixin(destination[key], source[key], overwrite, level + 1); } else { - destination[key] = source[key]; + if (key in destination) { + if (overwrite) { + if (level === 0 && key === 'type') { + // don't merge the 'type' property + } else { + destination[key] = source[key]; + } + } + } else { + destination[key] = source[key]; + } } } });