Skip to content

Commit 2d23462

Browse files
committed
Configure change listeners before checking for toolchain
1 parent df80d22 commit 2d23462

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/extension.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<Api |
8282

8383
context.subscriptions.push(...commands.registerToolchainCommands(toolchain));
8484

85-
if (!toolchain) {
86-
showToolchainError();
87-
return;
88-
}
89-
90-
const workspaceContext = await WorkspaceContext.create(outputChannel, toolchain);
91-
context.subscriptions.push(...commands.register(workspaceContext));
92-
context.subscriptions.push(workspaceContext);
93-
context.subscriptions.push(registerDebugger(workspaceContext));
94-
9585
context.subscriptions.push(
9686
vscode.workspace.onDidChangeConfiguration(event => {
9787
// on toolchain config change, reload window
@@ -114,6 +104,16 @@ export async function activate(context: vscode.ExtensionContext): Promise<Api |
114104
})
115105
);
116106

107+
if (!toolchain) {
108+
showToolchainError();
109+
return;
110+
}
111+
112+
const workspaceContext = await WorkspaceContext.create(outputChannel, toolchain);
113+
context.subscriptions.push(...commands.register(workspaceContext));
114+
context.subscriptions.push(workspaceContext);
115+
context.subscriptions.push(registerDebugger(workspaceContext));
116+
117117
// listen for workspace folder changes and active text editor changes
118118
workspaceContext.setupEventListeners();
119119

0 commit comments

Comments
 (0)