diff --git a/src/chrome/chromeDebugAdapter.ts b/src/chrome/chromeDebugAdapter.ts index 9e28ca139..48ae8ba76 100644 --- a/src/chrome/chromeDebugAdapter.ts +++ b/src/chrome/chromeDebugAdapter.ts @@ -759,12 +759,19 @@ export abstract class ChromeDebugAdapter implements IDebugAdapter { this._sourceMapTransformer.setBreakpoints(args, requestSeq); this._pathTransformer.setBreakpoints(args); + // Get the target url of the script let targetScriptUrl: string; if (args.source.sourceReference) { const handle = this._sourceHandles.get(args.source.sourceReference); - const targetScript = this._scriptsById.get(handle.scriptId); - if (targetScript) { - targetScriptUrl = targetScript.url; + if (!handle.scriptId && args.source.path) { + // A sourcemapped script with inline sources won't have a scriptId here, but the + // source.path has been fixed. + targetScriptUrl = args.source.path; + } else { + const targetScript = this._scriptsById.get(handle.scriptId); + if (targetScript) { + targetScriptUrl = targetScript.url; + } } } else if (args.source.path) { targetScriptUrl = args.source.path; diff --git a/src/transformers/baseSourceMapTransformer.ts b/src/transformers/baseSourceMapTransformer.ts index cc9083140..58efb59c0 100644 --- a/src/transformers/baseSourceMapTransformer.ts +++ b/src/transformers/baseSourceMapTransformer.ts @@ -174,6 +174,7 @@ export class BaseSourceMapTransformer { // Clear the path and set the sourceReference - the client will ask for // the source later and it will be returned from the sourcemap stackFrame.source.name = path.basename(mapped.source); + stackFrame.source.path = mapped.source; stackFrame.source.sourceReference = this.getSourceReferenceForScriptPath(mapped.source, inlinedSource); stackFrame.source.origin = utils.localize('origin.inlined.source.map', "read-only inlined content from source map"); stackFrame.line = mapped.line;