Fixes a problem I encountered while testing run/debug
This commit is contained in:
Родитель
e3365bbfe4
Коммит
f65539f1cd
|
@ -222,7 +222,7 @@ export class CppBuildTaskProvider implements TaskProvider {
|
|||
const cppBuildTask: CppBuildTask = new Task(definition, TaskScope.Workspace, task.label, ext.CppSourceStr);
|
||||
cppBuildTask.detail = task.detail;
|
||||
cppBuildTask.existing = true;
|
||||
if (task.group.isDefault) {
|
||||
if (!util.isString(task.group) && task.group?.isDefault) {
|
||||
cppBuildTask.isDefault = true;
|
||||
}
|
||||
return cppBuildTask;
|
||||
|
@ -260,8 +260,8 @@ export class CppBuildTaskProvider implements TaskProvider {
|
|||
// Modify the current default task
|
||||
rawTasksJson.tasks.forEach((task: any) => {
|
||||
if (task.label === selectedTask?.definition.label) {
|
||||
task.group = { kind: "build", "isDefault": true };
|
||||
} else if (task.group.kind && task.group.kind === "build" && task.group.isDefault && task.group.isDefault === true) {
|
||||
task.group = { kind: "build", isDefault: true };
|
||||
} else if (!util.isString(task.group) && task.group?.kind === "build" && task.group?.isDefault) {
|
||||
task.group = "build";
|
||||
}
|
||||
});
|
||||
|
@ -270,7 +270,7 @@ export class CppBuildTaskProvider implements TaskProvider {
|
|||
const newTask: any = {
|
||||
...selectedTask.definition,
|
||||
problemMatcher: selectedTask.problemMatchers,
|
||||
group: { kind: "build", "isDefault": true },
|
||||
group: { kind: "build", isDefault: true },
|
||||
detail: localize("task_generated_by_debugger", "Task generated by Debugger.")
|
||||
};
|
||||
rawTasksJson.tasks.push(newTask);
|
||||
|
|
Загрузка…
Ссылка в новой задаче