提交 1bf1b55e 编写于 作者: I isidor

debug: do not listen on launch.json changes, re-read it before debug start

fixes #47021
上级 4b74bb08
......@@ -82,7 +82,6 @@ export class DebugService implements debug.IDebugService {
private debugType: IContextKey<string>;
private debugState: IContextKey<string>;
private breakpointsToSendOnResourceSaved: Set<string>;
private launchJsonChanged: boolean;
private firstSessionStart: boolean;
private skipRunningTask: boolean;
private previousState: debug.State;
......@@ -698,7 +697,6 @@ export class DebugService implements debug.IDebugService {
this.allProcesses.clear();
this.model.getBreakpoints().forEach(bp => bp.verified = false);
}
this.launchJsonChanged = false;
let config: debug.IConfig, compound: debug.ICompound;
if (!configOrName) {
......@@ -1081,12 +1079,9 @@ export class DebugService implements debug.IDebugService {
return new TPromise<void>((c, e) => {
setTimeout(() => {
// Read the configuration again if a launch.json has been changed, if not just use the inmemory configuration
let config = process.configuration;
const launch = process.session.root ? this.configurationManager.getLaunch(process.session.root.uri) : undefined;
if (this.launchJsonChanged && launch) {
this.launchJsonChanged = false;
if (launch) {
config = launch.getConfiguration(process.configuration.name) || config;
// Take the type from the process since the debug extension might overwrite it #21316
config.type = process.configuration.type;
......@@ -1303,13 +1298,9 @@ export class DebugService implements debug.IDebugService {
}
fileChangesEvent.getUpdated().forEach(event => {
if (this.breakpointsToSendOnResourceSaved.delete(event.resource.toString())) {
this.sendBreakpoints(event.resource, true).done(null, errors.onUnexpectedError);
}
if (strings.endsWith(event.resource.toString(), '.vscode/launch.json')) {
this.launchJsonChanged = true;
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册