From af04a4a1ca929949cc430010f6bac0fcc592683c Mon Sep 17 00:00:00 2001 From: Josh Comley Date: Thu, 16 May 2019 15:20:37 +0100 Subject: [PATCH] Allow for 'tns' platform specific files --- src/debug-adapter/nativeScriptSourceMapTransformer.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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);