@@ -558,13 +558,16 @@ class ProcAutomaticPortForwarding extends Disposable {
558558 for ( const value of startingCandidates ) {
559559 this . initialCandidates . add ( makeAddress ( value . host , value . port ) ) ;
560560 }
561+ this . logService . debug ( `ForwardedPorts: (ProcForwarding) Initial candidates set to ${ startingCandidates . join ( ', ' ) } ` ) ;
561562 }
562563
563564 private async forwardCandidates ( ) : Promise < RemoteTunnel [ ] | undefined > {
564565 let attributes : Map < number , Attributes > | undefined ;
565566 const allTunnels : RemoteTunnel [ ] = [ ] ;
567+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Attempting to forward ${ this . remoteExplorerService . tunnelModel . candidates . length } candidates` ) ;
566568 for ( const value of this . remoteExplorerService . tunnelModel . candidates ) {
567569 if ( ! value . detail ) {
570+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } missing detail` ) ;
568571 continue ;
569572 }
570573
@@ -586,18 +589,22 @@ class ProcAutomaticPortForwarding extends Disposable {
586589
587590 const portAttributes = attributes ?. get ( value . port ) ;
588591 if ( portAttributes ?. onAutoForward === OnPortForward . Ignore ) {
592+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } is ignored` ) ;
589593 continue ;
590594 }
591595 const forwarded = await this . remoteExplorerService . forward ( { remote : value , source : AutoTunnelSource } , portAttributes ?? null ) ;
592596 if ( ! alreadyForwarded && forwarded ) {
597+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } has been forwarded` ) ;
593598 this . autoForwarded . add ( address ) ;
594599 } else if ( forwarded ) {
600+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } has been notified` ) ;
595601 this . notifiedOnly . add ( address ) ;
596602 }
597603 if ( forwarded ) {
598604 allTunnels . push ( forwarded ) ;
599605 }
600606 }
607+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Forwarded ${ allTunnels . length } candidates` ) ;
601608 if ( allTunnels . length === 0 ) {
602609 return undefined ;
603610 }
0 commit comments