Skip to content

Commit

Permalink
Add more logging to VSCode setup
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Nov 26, 2022
1 parent 1d549e5 commit 23135ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ide/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ let findWorkspaceRoot = async (): Promise<string | null> => {

let folderPath = folders[0].uri.fsPath;
let activeFilePath = activeEditor.document.fileName;
log(`Looking for workspace root between ${folderPath} and ${activeFilePath}`);
let components = path.relative(folderPath, activeFilePath).split(path.sep);
let folderSubdirTil = (idx: number) =>
path.join(folderPath, ...components.slice(0, idx));
Expand All @@ -153,7 +154,10 @@ export async function setup(
context: vscode.ExtensionContext
): Promise<CallFlowistry | null> {
let workspace_root = await findWorkspaceRoot();
if (!workspace_root) return null;
if (!workspace_root) {
log("Failed to find workspace root!");
return null;
}
log("Workspace root", workspace_root);

let [cargo, cargo_args] = cargo_command();
Expand Down

0 comments on commit 23135ab

Please sign in to comment.