mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-26 18:27:38 +01:00
debug: rename resolveConfiguration to substiuteVariables. Also getEnabledBreakpointsForResource should also respect enabled property
This commit is contained in:
@@ -542,7 +542,7 @@ export interface ILaunch {
|
||||
* Returns the resolved configuration.
|
||||
* Replaces os specific values, system variables, interactive variables.
|
||||
*/
|
||||
resolveConfiguration(config: IConfig): TPromise<IConfig>;
|
||||
substituteVariables(config: IConfig): TPromise<IConfig>;
|
||||
|
||||
/**
|
||||
* Opens the launch.json file. Creates if it does not exist.
|
||||
|
||||
@@ -875,10 +875,10 @@ export class Model implements IModel {
|
||||
return this.breakpoints.filter(bp => bp.uri.toString() === uriString);
|
||||
}
|
||||
|
||||
public getActivatedBreakpointsForResource(resource: uri): IBreakpoint[] {
|
||||
public getEnabledBreakpointsForResource(resource: uri): IBreakpoint[] {
|
||||
if (this.breakpointsActivated) {
|
||||
const uriString = resource.toString();
|
||||
return this.breakpoints.filter(bp => bp.uri.toString() === uriString);
|
||||
return this.breakpoints.filter(bp => bp.uri.toString() === uriString && bp.enabled);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ class Launch implements ILaunch {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public resolveConfiguration(config: IConfig): TPromise<IConfig> {
|
||||
public substituteVariables(config: IConfig): TPromise<IConfig> {
|
||||
const result = objects.deepClone(config) as IConfig;
|
||||
// Set operating system specific properties #1873
|
||||
const setOSProperties = (flag: boolean, osConfig: IEnvConfig) => {
|
||||
|
||||
@@ -788,7 +788,7 @@ export class DebugService implements debug.IDebugService {
|
||||
|
||||
private createProcess(launch: debug.ILaunch, config: debug.IConfig, sessionId: string): TPromise<void> {
|
||||
return this.textFileService.saveAll().then(() =>
|
||||
(launch ? launch.resolveConfiguration(config) : TPromise.as(config)).then(resolvedConfig => {
|
||||
(launch ? launch.substituteVariables(config) : TPromise.as(config)).then(resolvedConfig => {
|
||||
if (!resolvedConfig) {
|
||||
// User canceled resolving of interactive variables, silently return
|
||||
return undefined;
|
||||
@@ -1205,7 +1205,7 @@ export class DebugService implements debug.IDebugService {
|
||||
return TPromise.as(null);
|
||||
}
|
||||
|
||||
const breakpointsToSend = this.model.getActivatedBreakpointsForResource(modelUri).filter(bp => bp.enabled);
|
||||
const breakpointsToSend = this.model.getEnabledBreakpointsForResource(modelUri);
|
||||
|
||||
const source = process.getSourceForUri(modelUri);
|
||||
let rawSource: DebugProtocol.Source;
|
||||
|
||||
Reference in New Issue
Block a user