@@ -505,13 +505,15 @@ class ProbeInspectorSession {
505505
506506 onChildOutput ( text , which ) {
507507 if ( which !== 'stderr' ) { return ; }
508+ debug ( 'child stderr: %j' , text ) ;
508509
509510 this . childStderr += text ;
510511
511512 const combined = this . disconnectSentinelBuffer + text ;
512513 // Detect the disconnect sentinel.
513514 if ( this . connected &&
514515 StringPrototypeIncludes ( combined , kProbeDisconnectSentinel ) ) {
516+ debug ( 'disconnect sentinel detected, resetting client' ) ;
515517 this . disconnectRequested = true ;
516518 this . client . reset ( ) ;
517519 }
@@ -587,6 +589,7 @@ class ProbeInspectorSession {
587589 }
588590
589591 onPaused ( params ) {
592+ debug ( 'paused: finished=%d, reason=%s hitBreakpoints=%j' , this . finished , params . reason , params . hitBreakpoints ) ;
590593 this . handlePaused ( params ) . catch ( ( error ) => {
591594 if ( error === kInspectorFailedSentinel ) { return ; }
592595 this . recordInspectorFailure ( {
@@ -837,6 +840,9 @@ class ProbeInspectorSession {
837840 }
838841
839842 onScriptParsed ( params ) {
843+ if ( params . url && ! StringPrototypeStartsWith ( params . url , 'node:' ) ) {
844+ debug ( 'scriptParsed: scriptId=%s url=%s, length=%d' , params . scriptId , params . url , params . length ) ;
845+ }
840846 // This map grows by the number of scripts parsed, which is limited, and is just a
841847 // small string -> string map. The lifetime is bounded by probe timeout etc. so cleanup is overkill.
842848 this . scriptIdToUrl . set ( params . scriptId , params . url ) ;
@@ -879,6 +885,8 @@ class ProbeInspectorSession {
879885 }
880886
881887 const result = await this . callCdp ( 'Debugger.setBreakpointByUrl' , params ) ;
888+ debug ( 'breakpoint set: id=%s urlRegex=%s locations=%j' ,
889+ result . breakpointId , params . urlRegex , result . locations ) ;
882890 this . breakpointDefinitions . set ( result . breakpointId , { probeIndices } ) ;
883891 }
884892 }
0 commit comments