@@ -6,7 +6,7 @@ import * as os from 'os';
66import * as fs from 'fs' ;
77import * as path from 'path' ;
88
9- import { ChromeDebugAdapter as CoreDebugAdapter , logger , utils as coreUtils , ISourceMapPathOverrides , ChromeDebugSession , telemetry , ITelemetryPropertyCollector } from 'vscode-chrome-debug-core' ;
9+ import { ChromeDebugAdapter as CoreDebugAdapter , logger , utils as coreUtils , ISourceMapPathOverrides , ChromeDebugSession , telemetry , ITelemetryPropertyCollector , IOnPausedResult } from 'vscode-chrome-debug-core' ;
1010import { spawn , ChildProcess , fork , execSync } from 'child_process' ;
1111import { Crdp } from 'vscode-chrome-debug-core' ;
1212import { DebugProtocol } from 'vscode-debugprotocol' ;
@@ -285,15 +285,18 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
285285 ] ;
286286 }
287287
288- protected async onPaused ( notification : Crdp . Debugger . PausedEvent , expectingStopReason = this . _expectingStopReason ) : Promise < void > {
289- this . _overlayHelper . doAndCancel ( ( ) => {
288+ protected async onPaused ( notification : Crdp . Debugger . PausedEvent , expectingStopReason = this . _expectingStopReason ) : Promise < IOnPausedResult > {
289+ const result = ( await super . onPaused ( notification , expectingStopReason ) ) ;
290290
291- return this . _domains . has ( 'Overlay' ) ?
292- this . chrome . Overlay . setPausedInDebuggerMessage ( { message : this . _pagePauseMessage } ) . catch ( ( ) => { } ) :
293- ( < any > this . chrome ) . Page . configureOverlay ( { message : this . _pagePauseMessage } ) . catch ( ( ) => { } ) ;
294- } ) ;
291+ if ( result . didPause ) {
292+ this . _overlayHelper . doAndCancel ( ( ) => {
293+ return this . _domains . has ( 'Overlay' ) ?
294+ this . chrome . Overlay . setPausedInDebuggerMessage ( { message : this . _pagePauseMessage } ) . catch ( ( ) => { } ) :
295+ ( < any > this . chrome ) . Page . configureOverlay ( { message : this . _pagePauseMessage } ) . catch ( ( ) => { } ) ;
296+ } ) ;
297+ }
295298
296- return super . onPaused ( notification , expectingStopReason ) ;
299+ return result ;
297300 }
298301
299302 protected threadName ( ) : string {
0 commit comments