Skip to content

Commit d92c2ed

Browse files
committed
Add logging
1 parent 528828e commit d92c2ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ export class EnvsCollectionService extends PythonEnvsWatcher<PythonEnvCollection
347347
) {
348348
return;
349349
}
350+
traceError(`Environment ${exe} is missing from native locator`);
350351
switch (env.kind) {
351352
case PythonEnvKind.Conda:
352353
missingEnvironments.missingNativeCondaEnvs += 1;
@@ -589,6 +590,9 @@ export class EnvsCollectionService extends PythonEnvsWatcher<PythonEnvCollection
589590
resolvedEnv.version.micro !== nativeVersion.micro ||
590591
resolvedEnv.version.micro !== nativeVersion.micro
591592
) {
593+
traceError(
594+
`Environment ${e.executable} got the wrong version from native locator (Native = ${e.version}, Actual ${resolvedEnv.version.sysVersion})`,
595+
);
592596
switch (kind) {
593597
case PythonEnvKind.Conda:
594598
invalidVersions.invalidVersionsCondaEnvs += 1;
@@ -640,6 +644,9 @@ export class EnvsCollectionService extends PythonEnvsWatcher<PythonEnvCollection
640644
}
641645
}
642646
if (e.prefix && resolvedEnv.executable.sysPrefix.toLowerCase() !== e.prefix.trim().toLowerCase()) {
647+
traceError(
648+
`Environment ${e.executable} got the wrong Sys.Prefix from native locator (Native = ${e.prefix}, Actual ${resolvedEnv.executable.sysPrefix})`,
649+
);
643650
switch (kind) {
644651
case PythonEnvKind.Conda:
645652
invalidSysPrefix.invalidSysPrefixCondaEnvs += 1;

0 commit comments

Comments
 (0)