Skip to content

Commit f695999

Browse files
WIP
1 parent 5705458 commit f695999

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

server/src/server.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,21 @@ let compilerLogsWatcher = chokidar
217217
},
218218
})
219219
.on("all", (_e, changedPath) => {
220+
console.log("changes in path: ", changedPath);
220221
if (changedPath.includes("build.ninja")) {
222+
console.log("Changed path includes build ninja");
221223
if (
222224
config.extensionConfiguration.cache?.projectConfig?.enabled === true
223225
) {
224226
let projectRoot = utils.findProjectRootOfFile(changedPath);
225227
if (projectRoot != null) {
228+
console.log("Sync project config cache");
226229
syncProjectConfigCache(projectRoot);
227230
}
228231
}
229232
} else {
230233
try {
234+
console.log("Send updated diagnostics");
231235
sendUpdatedDiagnostics();
232236
sendCompilationFinishedMessage();
233237
if (config.extensionConfiguration.inlayHints?.enable === true) {
@@ -236,12 +240,13 @@ let compilerLogsWatcher = chokidar
236240
if (config.extensionConfiguration.codeLens === true) {
237241
sendCodeLensRefresh();
238242
}
239-
} catch {
240-
console.log("Error while sending updated diagnostics");
243+
} catch (error) {
244+
console.log("Error while sending updated diagnostics", error);
241245
}
242246
}
243247
});
244248
let stopWatchingCompilerLog = () => {
249+
console.log("Stop watching compiler log");
245250
// TODO: cleanup of compilerLogs?
246251
compilerLogsWatcher.close();
247252
};

0 commit comments

Comments
 (0)