* Wait for source map to load and set all breakpoints in this particular * script. Returns true if the debugger should remain paused.
(scriptId: string, brokenOn: Cdp.Debugger.Location)
| 1229 | * script. Returns true if the debugger should remain paused. |
| 1230 | */ |
| 1231 | async _handleSourceMapPause(scriptId: string, brokenOn: Cdp.Debugger.Location): Promise<boolean> { |
| 1232 | this._pausedForSourceMapScriptId = scriptId; |
| 1233 | const timeout = this._sourceContainer.sourceMapTimeouts().scriptPaused; |
| 1234 | const script = this._sourceContainer.scriptsById.get(scriptId); |
| 1235 | if (!script) { |
| 1236 | this._pausedForSourceMapScriptId = undefined; |
| 1237 | return false; |
| 1238 | } |
| 1239 | |
| 1240 | const result = await Promise.race([ |
| 1241 | this._getOrStartLoadingSourceMaps(script, brokenOn), |
| 1242 | delay(timeout), |
| 1243 | ]); |
| 1244 | console.assert(this._pausedForSourceMapScriptId === scriptId); |
| 1245 | this._pausedForSourceMapScriptId = undefined; |
| 1246 | |
| 1247 | return ( |
| 1248 | !!result && |
| 1249 | result |
| 1250 | .map(base1To0) |
| 1251 | .some( |
| 1252 | b => |
| 1253 | b.lineNumber === brokenOn.lineNumber && |
| 1254 | (brokenOn.columnNumber === undefined || brokenOn.columnNumber === b.columnNumber), |
| 1255 | ) |
| 1256 | ); |
| 1257 | } |
| 1258 | |
| 1259 | /** |
| 1260 | * Loads sourcemaps for the given script and invokes the handler, if we |
no test coverage detected