* or by directly passing a [DebugConfiguration](#DebugConfiguration).
* or by directly passing a [DebugConfiguration](#DebugConfiguration).
* The named configurations are looked up in '.vscode/launch.json' found in the given folder.
* The named configurations are looked up in '.vscode/launch.json' found in the given folder.
* Before debugging starts, all unsaved files are saved and the launch configurations are brought up-to-date.
* Before debugging starts, all unsaved files are saved and the launch configurations are brought up-to-date.
* Folder specific variables used in the configuration (e.g. '${workspaceRoot}') are resolved against the given folder.
* Folder specific variables used in the configuration (e.g. '${workspaceFolder}') are resolved against the given folder.
* @param folder The [workspace folder](#WorkspaceFolder) for looking up named configurations and resolving variables or `undefined` for a non-folder setup.
* @param folder The [workspace folder](#WorkspaceFolder) for looking up named configurations and resolving variables or `undefined` for a non-folder setup.
* @param nameOrConfiguration Either the name of a debug or compound configuration or a [DebugConfiguration](#DebugConfiguration) object.
* @param nameOrConfiguration Either the name of a debug or compound configuration or a [DebugConfiguration](#DebugConfiguration) object.
* @return A thenable that resolves when debugging could be successfully started.
* @return A thenable that resolves when debugging could be successfully started.
assert.strictEqual(configurationResolverService.resolve(workspace,'abc ${workspaceRoot} ${env:key1} xyz'),'abc \\VSCode\\workspaceLocation Value for Key1 xyz');
assert.strictEqual(configurationResolverService.resolve(workspace,'abc ${workspaceFolder} ${env:key1} xyz'),'abc \\VSCode\\workspaceLocation Value for Key1 xyz');
}else{
}else{
assert.strictEqual(configurationResolverService.resolve(workspace,'abc ${workspaceRoot} ${env:key1} xyz'),'abc /VSCode/workspaceLocation Value for Key1 xyz');
assert.strictEqual(configurationResolverService.resolve(workspace,'abc ${workspaceFolder} ${env:key1} xyz'),'abc /VSCode/workspaceLocation Value for Key1 xyz');
}
}
});
});
test('substitute many env variable',()=>{
test('substitute many env variable',()=>{
if(platform.isWindows){
if(platform.isWindows){
assert.strictEqual(configurationResolverService.resolve(workspace,'${workspaceRoot} - ${workspaceRoot} ${env:key1} - ${env:key2}'),'\\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation Value for Key1 - Value for Key2');
assert.strictEqual(configurationResolverService.resolve(workspace,'${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'),'\\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation Value for Key1 - Value for Key2');
}else{
}else{
assert.strictEqual(configurationResolverService.resolve(workspace,'${workspaceRoot} - ${workspaceRoot} ${env:key1} - ${env:key2}'),'/VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2');
assert.strictEqual(configurationResolverService.resolve(workspace,'${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'),'/VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2');
assert.strictEqual(service.resolve(workspace,'${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceRoot} - ${workspaceRoot} ${env:key1} - ${env:key2}'),'foo bar \\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation Value for Key1 - Value for Key2');
assert.strictEqual(service.resolve(workspace,'${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'),'foo bar \\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation Value for Key1 - Value for Key2');
}else{
}else{
assert.strictEqual(service.resolve(workspace,'${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceRoot} - ${workspaceRoot} ${env:key1} - ${env:key2}'),'foo bar /VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2');
assert.strictEqual(service.resolve(workspace,'${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'),'foo bar /VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2');