Skip to content

Commit ac7920b

Browse files
plemarquandmichael-weng
authored andcommitted
Debug build run test
1 parent afb2d9e commit ac7920b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/commands/build.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,26 @@ export async function debugBuildWithOptions(
7474
) {
7575
const current = ctx.currentFolder;
7676
if (!current) {
77+
console.log(" >>> debugBuildWithOptions: No current folder on WorkspaceContext");
7778
return;
7879
}
7980

8081
const file = vscode.window.activeTextEditor?.document.fileName;
8182
if (!file) {
83+
console.log(" >>> debugBuildWithOptions: No active text editor");
8284
return;
8385
}
8486

8587
const target = current.swiftPackage.getTarget(file);
86-
if (!target || target.type !== "executable") {
88+
if (!target) {
89+
console.log(" >>> debugBuildWithOptions: No active target");
90+
return;
91+
}
92+
93+
if (target.type !== "executable") {
94+
console.log(
95+
` >>> debugBuildWithOptions: Target is not an executable, instead is ${target.type}`
96+
);
8797
return;
8898
}
8999

0 commit comments

Comments
 (0)