We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7520abc commit 68ed5aeCopy full SHA for 68ed5ae
packages/network-debugger/src/fork/request-center.ts
@@ -141,6 +141,19 @@ export class RequestCenter {
141
}
142
143
public initRequest(request: RequestDetail) {
144
+ // replace callFrames' scriptId
145
+ // TODO: 双向绑定 initiator
146
+ if (request.initiator) {
147
+ request.initiator.stack.callFrames.forEach((frame) => {
148
+ const fileUrl = pathToFileURL(frame.url)
149
+ const scriptId =
150
+ this.resourceService.getScriptIdByUrl(fileUrl.href) ??
151
+ this.resourceService.getScriptIdByUrl(frame.url)
152
+ if (scriptId) {
153
+ frame.scriptId = scriptId
154
+ }
155
+ })
156
157
this.requests[request.id] = request
158
159
0 commit comments