Skip to content

Commit ba5be71

Browse files
authored
Merge pull request #2189 from NativeScript/raikov/improve-ios-log-filter
Improved the ios-log-filter to take the source file from the source map
2 parents 3f0c49c + d069b34 commit ba5be71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/ios-log-filter.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ export class IOSLogFilter implements Mobile.IPlatformLogFilter {
5454
let sourceMap = this.$fs.readText(sourceMapFile, "utf8").wait();
5555
let smc = new sourcemap.SourceMapConsumer(sourceMap);
5656
let originalPosition = smc.originalPositionFor({line:row,column:column});
57+
let sourceFile = smc.sources.length > 0 ? file.replace(smc.file, smc.sources[0]) : file;
5758
data = data.substring(0, fileIndex + fileString.length)
58-
+ file.replace(".js", ".ts") + ":"
59+
+ sourceFile + ":"
5960
+ originalPosition.line + ":"
6061
+ originalPosition.column;
6162
for (let i = 3; i<parts.length; i++) {

0 commit comments

Comments
 (0)