@@ -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 ( {
@@ -841,6 +844,9 @@ class ProbeInspectorSession {
841844 }
842845
843846 onScriptParsed ( params ) {
847+ if ( params . url && ! StringPrototypeStartsWith ( params . url , 'node:' ) ) {
848+ debug ( 'scriptParsed: scriptId=%s url=%s, length=%d' , params . scriptId , params . url , params . length ) ;
849+ }
844850 // This map grows by the number of scripts parsed, which is limited, and is just a
845851 // small string -> string map. The lifetime is bounded by probe timeout etc. so cleanup is overkill.
846852 this . scriptIdToUrl . set ( params . scriptId , params . url ) ;
@@ -883,6 +889,8 @@ class ProbeInspectorSession {
883889 }
884890
885891 const result = await this . callCdp ( 'Debugger.setBreakpointByUrl' , params ) ;
892+ debug ( 'breakpoint set: id=%s urlRegex=%s locations=%j' ,
893+ result . breakpointId , params . urlRegex , result . locations ) ;
886894 this . breakpointDefinitions . set ( result . breakpointId , { probeIndices } ) ;
887895 }
888896 }
0 commit comments