Skip to content

Commit 0ead6bf

Browse files
committed
feat: config flag for debugging
1 parent 747af5d commit 0ead6bf

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@
233233
"type": "boolean",
234234
"default": false,
235235
"description": "Whether to auto resync current buffer or not when out of sync"
236+
},
237+
"codemp.debug": {
238+
"type": "boolean",
239+
"default": false,
240+
"description": "Enable debug logging"
236241
}
237242
}
238243
}

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ export let LOGGER = vscode.window.createOutputChannel("codemp", { log: true });
1212

1313
// extension is activated the very first time the command is executed
1414
export function activate(context: vscode.ExtensionContext) {
15+
let config = vscode.workspace.getConfiguration('codemp');
16+
let debug = config.get<boolean>("debug");
17+
1518
// start codemp log poller
1619

17-
log_poller_task(new codemp.JsLogger()); // don't await it! run it in background forever
20+
log_poller_task(new codemp.JsLogger(debug)); // don't await it! run it in background forever
1821
let sub = vscode.window.registerTreeDataProvider('codemp-tree-view', provider);
1922
context.subscriptions.push(sub);
2023

0 commit comments

Comments
 (0)