mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
debug: propoagte the unresolvedConfiguration to more than the first restart
fixes #49810
This commit is contained in:
@@ -690,7 +690,7 @@ export class DebugService implements debug.IDebugService {
|
||||
this.model.removeWatchExpressions(id);
|
||||
}
|
||||
|
||||
public startDebugging(launch: debug.ILaunch, configOrName?: debug.IConfig | string, noDebug = false): TPromise<void> {
|
||||
public startDebugging(launch: debug.ILaunch, configOrName?: debug.IConfig | string, noDebug = false, unresolvedConfiguration?: debug.IConfig, ): TPromise<void> {
|
||||
const sessionId = generateUuid();
|
||||
this.updateStateAndEmit(sessionId, debug.State.Initializing);
|
||||
const wrapUpState = () => {
|
||||
@@ -752,7 +752,7 @@ export class DebugService implements debug.IDebugService {
|
||||
}
|
||||
}
|
||||
|
||||
return this.startDebugging(launchForName, name, noDebug);
|
||||
return this.startDebugging(launchForName, name, noDebug, unresolvedConfiguration);
|
||||
}));
|
||||
}
|
||||
if (configOrName && !config) {
|
||||
@@ -770,7 +770,7 @@ export class DebugService implements debug.IDebugService {
|
||||
// a no-folder workspace has no launch.config
|
||||
config = <debug.IConfig>{};
|
||||
}
|
||||
const unresolvedConfiguration = deepClone(config);
|
||||
unresolvedConfiguration = unresolvedConfiguration || deepClone(config);
|
||||
|
||||
if (noDebug) {
|
||||
config.noDebug = true;
|
||||
@@ -1106,9 +1106,10 @@ export class DebugService implements debug.IDebugService {
|
||||
let configToUse = session.configuration;
|
||||
|
||||
const launch = session.raw.root ? this.configurationManager.getLaunch(session.raw.root.uri) : undefined;
|
||||
const unresolvedConfiguration = (<Session>session).unresolvedConfiguration;
|
||||
if (launch) {
|
||||
const config = launch.getConfiguration(session.configuration.name);
|
||||
if (config && !equals(config, (<Session>session).unresolvedConfiguration)) {
|
||||
if (config && !equals(config, unresolvedConfiguration)) {
|
||||
// Take the type from the session since the debug extension might overwrite it #21316
|
||||
configToUse = config;
|
||||
configToUse.type = session.configuration.type;
|
||||
@@ -1117,7 +1118,7 @@ export class DebugService implements debug.IDebugService {
|
||||
}
|
||||
configToUse.__restart = restartData;
|
||||
this.skipRunningTask = !!restartData;
|
||||
this.startDebugging(launch, configToUse).then(() => c(null), err => e(err));
|
||||
this.startDebugging(launch, configToUse, configToUse.noDebug, unresolvedConfiguration).then(() => c(null), err => e(err));
|
||||
}, 300);
|
||||
});
|
||||
}).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user