Skip to content

Commit 8d04969

Browse files
authored
feat: Exception Stack Trace Decoder for esp32 #1893 (#2)
* fix: different version of tool I found a bug in which, the version of the tool in Arduino15 folder was different from the version the serial monitor was outputting, which would make the link unvalid (unreachable)
1 parent 7630d0a commit 8d04969

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: arduino-ide-extension/src/browser/serial/decode/decode-output.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ export class DecodeOutput extends React.Component<
2929
elements: [],
3030
};
3131
}
32+
33+
// If a string of <digit>.<digit>.<digit> or <digit>.<digit> is found, replaces it with "*"
34+
changeVersionToAny = (path: string) => {
35+
const regex = new RegExp(/(\d\.\d\.\d)|(\d\.\d)/g);
36+
const found = path.match(regex);
37+
if(found) {
38+
return path.replace(found[0], "*")
39+
}
40+
return path
41+
}
3242

3343
isClientPath = async (path:string): Promise<boolean> => {
3444
return await spawnCommand("cd", [
@@ -60,6 +70,7 @@ export class DecodeOutput extends React.Component<
6070
line.shift();
6171
}
6272
let pathSplit = line[3].split(":");
73+
pathSplit[0] = this.changeVersionToAny(pathSplit[0]);
6374
let obj: Element = {
6475
address: line[0],
6576
function: line[1],

0 commit comments

Comments
 (0)