diff --git a/src/adapter/breakpoints/breakpointBase.ts b/src/adapter/breakpoints/breakpointBase.ts index 19471805d..8fe615050 100644 --- a/src/adapter/breakpoints/breakpointBase.ts +++ b/src/adapter/breakpoints/breakpointBase.ts @@ -563,7 +563,11 @@ export abstract class Breakpoint { // prefer to set on script URL for non-anonymous scripts, since url breakpoints // will survive and be hit on reload. But don't set if the script has // a source URL, since V8 doesn't resolve these - if (script.url && !script.hasSourceURL) { + if ( + script.url && + !script.hasSourceURL && + (!script.embedderName || script.embedderName === script.url) + ) { return this._setByUrl(thread, script.url, lineColumn); } else { return this._setByScriptId(thread, script, lineColumn); diff --git a/src/adapter/source.ts b/src/adapter/source.ts index 74776eea3..70030c081 100644 --- a/src/adapter/source.ts +++ b/src/adapter/source.ts @@ -384,6 +384,7 @@ export interface IWasmLocationProvider extends ISourceLocationProvider { export interface ISourceScript { executionContextId: Cdp.Runtime.ExecutionContextId; scriptId: Cdp.Runtime.ScriptId; + embedderName?: string; hasSourceURL: boolean; url: string; } diff --git a/src/adapter/threads.ts b/src/adapter/threads.ts index 94e70b618..6af80dbe2 100644 --- a/src/adapter/threads.ts +++ b/src/adapter/threads.ts @@ -1522,6 +1522,7 @@ export class Thread implements IVariableStoreLocationProvider { prevSource.addScript({ scriptId: event.scriptId, url: event.url, + embedderName: event.embedderName, hasSourceURL: !!event.hasSourceURL, executionContextId: event.executionContextId, }); @@ -1573,6 +1574,7 @@ export class Thread implements IVariableStoreLocationProvider { source.addScript({ scriptId: event.scriptId, url: event.url, + embedderName: event.embedderName, hasSourceURL: !!event.hasSourceURL, executionContextId: event.executionContextId, }); @@ -1583,6 +1585,7 @@ export class Thread implements IVariableStoreLocationProvider { const script: Script = { url: event.url, hasSourceURL: !!event.hasSourceURL, + embedderName: event.embedderName, scriptId: event.scriptId, executionContextId: event.executionContextId, source: createSource(),