@@ -1983,22 +1983,18 @@ export class Thread implements IVariableStoreLocationProvider {
1983
1983
handler ?: ScriptWithSourceMapHandler ,
1984
1984
) : Promise < boolean > {
1985
1985
this . _scriptWithSourceMapHandler = handler ;
1986
-
1987
1986
const needsPause = pause && this . _sourceContainer . sourceMapTimeouts ( ) . sourceMapMinPause
1988
1987
&& handler ;
1989
1988
if ( needsPause && ! this . _pauseOnSourceMapBreakpointIds ?. length ) {
1990
1989
// setting the URL breakpoint for wasm fails if debugger isn't fully initialized
1991
1990
await this . debuggerReady . promise ;
1992
1991
1993
- const wasmHandlers = Promise . all ( [ ...this . _executionContexts . keys ( ) ]
1994
- . map ( id => this . _installWasmPauseHandler ( id ) ) ) ;
1995
1992
const result = await Promise . all ( [
1996
1993
this . _cdp . Debugger . setInstrumentationBreakpoint ( {
1997
1994
instrumentation : 'beforeScriptWithSourceMapExecution' ,
1998
1995
} ) ,
1999
1996
] ) ;
2000
1997
this . _pauseOnSourceMapBreakpointIds = result . map ( r => r ?. breakpointId ) . filter ( truthy ) ;
2001
- await wasmHandlers ;
2002
1998
} else if ( ! needsPause && this . _pauseOnSourceMapBreakpointIds ?. length ) {
2003
1999
const breakpointIds = this . _pauseOnSourceMapBreakpointIds ;
2004
2000
this . _pauseOnSourceMapBreakpointIds = undefined ;
@@ -2007,6 +2003,14 @@ export class Thread implements IVariableStoreLocationProvider {
2007
2003
) ;
2008
2004
}
2009
2005
2006
+ // WASM pauses should be unconditionally installed because DWARF parsing
2007
+ // always happens at runtime, not in the brekapoint predictor (currently)
2008
+ if ( handler ) {
2009
+ await Promise . all (
2010
+ [ ...this . _executionContexts . keys ( ) ] . map ( id => this . _installWasmPauseHandler ( id ) ) ,
2011
+ ) ;
2012
+ }
2013
+
2010
2014
return ! ! this . _pauseOnSourceMapBreakpointIds ?. length ;
2011
2015
}
2012
2016
0 commit comments