Skip to content

Commit 7ffad88

Browse files
committed
Debug build run test
1 parent d1c69b2 commit 7ffad88

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
@@ -71,16 +71,26 @@ export async function folderCleanBuild(folderContext: FolderContext) {
7171
async function debugBuildWithOptions(ctx: WorkspaceContext, options: vscode.DebugSessionOptions) {
7272
const current = ctx.currentFolder;
7373
if (!current) {
74+
console.log(" >>> debugBuildWithOptions: No current folder on WorkspaceContext");
7475
return;
7576
}
7677

7778
const file = vscode.window.activeTextEditor?.document.fileName;
7879
if (!file) {
80+
console.log(" >>> debugBuildWithOptions: No active text editor");
7981
return;
8082
}
8183

8284
const target = current.swiftPackage.getTarget(file);
83-
if (!target || target.type !== "executable") {
85+
if (!target) {
86+
console.log(" >>> debugBuildWithOptions: No active target");
87+
return;
88+
}
89+
90+
if (target.type !== "executable") {
91+
console.log(
92+
` >>> debugBuildWithOptions: Target is not an executable, instead is ${target.type}`
93+
);
8494
return;
8595
}
8696

0 commit comments

Comments
 (0)