提交 93dd7be4 编写于 作者: A Andre Weinand

call createSession command with root folder

上级 1a55aeb3
......@@ -646,6 +646,14 @@ export class DebugService implements debug.IDebugService {
}
public startDebugging(configOrName?: debug.IConfig | string, noDebug = false): TPromise<any> {
// temporary workaround: the folderUri should be an argument to startDebugging
let folderUri: uri = undefined;
const workspace = this.contextService.getWorkspace();
if (workspace && workspace.roots.length > 0) {
folderUri = workspace.roots[0];
}
// make sure to save all files and that the configuration is up to date
return this.textFileService.saveAll().then(() => this.configurationService.reloadConfiguration().then(() =>
this.extensionService.onReady().then(() => {
......@@ -684,7 +692,7 @@ export class DebugService implements debug.IDebugService {
}
if (commandAndType && commandAndType.command) {
const defaultConfig = noDebug ? { noDebug: true } : {};
return this.commandService.executeCommand(commandAndType.command, config || defaultConfig).then((result: StartSessionResult) => {
return this.commandService.executeCommand(commandAndType.command, config || defaultConfig, folderUri).then((result: StartSessionResult) => {
if (this.contextService.hasWorkspace()) {
if (result && result.status === 'initialConfiguration') {
return manager.openConfigFile(false, commandAndType.type);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册