提交 e9426456 编写于 作者: I isidor

debug: deep clone before passing in config

上级 44ec55d3
......@@ -13,6 +13,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
import { deepClone } from 'vs/base/common/objects';
export abstract class AbstractDebugAction extends Action {
......@@ -129,7 +130,8 @@ export class StartAction extends AbstractDebugAction {
async run(): Promise<boolean> {
let { launch, name, config } = this.debugService.getConfigurationManager().selectedConfiguration;
return this.debugService.startDebugging(launch, config || name, { noDebug: this.isNoDebug() });
const clonedConfig = deepClone(config);
return this.debugService.startDebugging(launch, clonedConfig || name, { noDebug: this.isNoDebug() });
}
protected isNoDebug(): boolean {
......
......@@ -372,7 +372,9 @@ export class DebugService implements IDebugService {
// a no-folder workspace has no launch.config
config = Object.create(null);
}
config!.noDebug = !!(options && options.noDebug);
if (options && options.noDebug) {
options.noDebug = true;
}
const unresolvedConfig = deepClone(config);
if (!type) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册