@@ -558,13 +558,16 @@ class ProcAutomaticPortForwarding extends Disposable {
558
558
for ( const value of startingCandidates ) {
559
559
this . initialCandidates . add ( makeAddress ( value . host , value . port ) ) ;
560
560
}
561
+ this . logService . debug ( `ForwardedPorts: (ProcForwarding) Initial candidates set to ${ startingCandidates . join ( ', ' ) } ` ) ;
561
562
}
562
563
563
564
private async forwardCandidates ( ) : Promise < RemoteTunnel [ ] | undefined > {
564
565
let attributes : Map < number , Attributes > | undefined ;
565
566
const allTunnels : RemoteTunnel [ ] = [ ] ;
567
+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Attempting to forward ${ this . remoteExplorerService . tunnelModel . candidates . length } candidates` ) ;
566
568
for ( const value of this . remoteExplorerService . tunnelModel . candidates ) {
567
569
if ( ! value . detail ) {
570
+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } missing detail` ) ;
568
571
continue ;
569
572
}
570
573
@@ -586,18 +589,22 @@ class ProcAutomaticPortForwarding extends Disposable {
586
589
587
590
const portAttributes = attributes ?. get ( value . port ) ;
588
591
if ( portAttributes ?. onAutoForward === OnPortForward . Ignore ) {
592
+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } is ignored` ) ;
589
593
continue ;
590
594
}
591
595
const forwarded = await this . remoteExplorerService . forward ( { remote : value , source : AutoTunnelSource } , portAttributes ?? null ) ;
592
596
if ( ! alreadyForwarded && forwarded ) {
597
+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } has been forwarded` ) ;
593
598
this . autoForwarded . add ( address ) ;
594
599
} else if ( forwarded ) {
600
+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Port ${ value . port } has been notified` ) ;
595
601
this . notifiedOnly . add ( address ) ;
596
602
}
597
603
if ( forwarded ) {
598
604
allTunnels . push ( forwarded ) ;
599
605
}
600
606
}
607
+ this . logService . trace ( `ForwardedPorts: (ProcForwarding) Forwarded ${ allTunnels . length } candidates` ) ;
601
608
if ( allTunnels . length === 0 ) {
602
609
return undefined ;
603
610
}
0 commit comments