diff --git a/src/debug-adapter/nativeScriptSourceMapTransformer.ts b/src/debug-adapter/nativeScriptSourceMapTransformer.ts index a99a8a5..fe059bb 100644 --- a/src/debug-adapter/nativeScriptSourceMapTransformer.ts +++ b/src/debug-adapter/nativeScriptSourceMapTransformer.ts @@ -96,6 +96,13 @@ export class NativeScriptSourceMapTransformer extends BaseSourceMapTransformer { // handle platform-specific files const { dir, name, ext } = path.parse(mappedPath); + const tnsFileName = `${name}.tns${ext}`; + const tnsPath = path.join(dir, tnsFileName); + + if (vsCodeChromeDebugUtils.existsSync(tnsPath)) { + mappedPath = tnsPath; + } + const platformFileName = `${name}.${this.targetPlatform}${ext}`; const platformPath = path.join(dir, platformFileName);