Skip to content

Commit 33a6b66

Browse files
authored
Attempt to fix Mac crash telemetry. (#5056)
* Attept to fix Mac crash telemetry.
1 parent fc21920 commit 33a6b66

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Extension/src/LanguageServer/extension.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,16 +1318,17 @@ function handleCrashFileRead(err: NodeJS.ErrnoException, data: string): void {
13181318
data = data.replace(/0x1........ \+ 0/g, "");
13191319

13201320
// Get rid of the process names on each line and just add it to the start.
1321-
const process1: string = "cpptools-srv\t";
1322-
const process2: string = "cpptools\t";
1321+
const process1: string = "cpptools-srv";
1322+
const process2: string = "cpptools";
13231323
if (data.includes(process1)) {
1324-
data = data.replace(new RegExp(process1, "g"), "");
1324+
data = data.replace(new RegExp(process1 + "\\s+", "g"), "");
13251325
data = `${process1}${binaryVersion}\n${data}`;
13261326
} else if (data.includes(process2)) {
1327-
data = data.replace(new RegExp(process2, "g"), "");
1327+
data = data.replace(new RegExp(process2 + "\\s+", "g"), "");
13281328
data = `${process2}${binaryVersion}\n${data}`;
13291329
} else {
1330-
return logCrashTelemetry("No process"); // Not expected, but just in case.
1330+
// Not expected, but just in case.
1331+
data = `cpptools?\t${binaryVersion}\n${data}`;
13311332
}
13321333

13331334
// Remove runtime lines because they can be different on different machines.

0 commit comments

Comments
 (0)