@@ -5,6 +5,7 @@ import * as fs from 'fs';
5
5
import * as path from 'path' ;
6
6
import { Uri } from 'vscode' ;
7
7
import { DiscoveryVariants } from '../../../../common/experiments/groups' ;
8
+ import { traceVerbose } from '../../../../common/logger' ;
8
9
import { FileChangeType } from '../../../../common/platform/fileSystemWatcher' ;
9
10
import { sleep } from '../../../../common/utils/async' ;
10
11
import { logError } from '../../../../logging' ;
@@ -112,11 +113,12 @@ export abstract class FSWatchingLocator<I = PythonEnvInfo> extends LazyResourceB
112
113
return root ;
113
114
} ) ;
114
115
const watchableRoots = ( await Promise . all ( promises ) ) . filter ( ( root ) => ! ! root ) as string [ ] ;
115
-
116
+ traceVerbose ( 'Start watching roots' ) ;
116
117
watchableRoots . forEach ( ( root ) => this . startWatchers ( root ) ) ;
117
118
}
118
119
119
120
private startWatchers ( root : string ) : void {
121
+ traceVerbose ( 'Start watching root' , root ) ;
120
122
const callback = async ( type : FileChangeType , executable : string ) => {
121
123
if ( type === FileChangeType . Created ) {
122
124
if ( this . opts . delayOnCreated !== undefined ) {
@@ -142,11 +144,13 @@ export abstract class FSWatchingLocator<I = PythonEnvInfo> extends LazyResourceB
142
144
this . emitter . fire ( { type, kind, searchLocation } ) ;
143
145
} ;
144
146
147
+ traceVerbose ( 'I am here1' , root ) ;
145
148
const globs = resolvePythonExeGlobs (
146
149
this . opts . baseGlob ,
147
150
// The structure determines which globs are returned.
148
151
this . opts . envStructure ,
149
152
) ;
153
+ traceVerbose ( 'I am here2' , root , globs ) ;
150
154
const watchers = globs . map ( ( g ) => watchLocationForPythonBinaries ( root , callback , g ) ) ;
151
155
this . disposables . push ( ...watchers ) ;
152
156
}
0 commit comments