Skip to content

Commit fd9b8c9

Browse files
Copiloteleanorjboyd
andcommitted
Add Python extension version to report issue output
Co-authored-by: eleanorjboyd <[email protected]>
1 parent a2571e7 commit fd9b8c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/extension.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { commands, ExtensionContext, LogOutputChannel, Terminal, Uri, window, workspace } from 'vscode';
1+
import { commands, extensions, ExtensionContext, LogOutputChannel, Terminal, Uri, window, workspace } from 'vscode';
22
import { PythonEnvironment, PythonEnvironmentApi, PythonProjectCreator } from './api';
33
import { ensureCorrectVersion } from './common/extVersion';
44
import { registerLogger, traceError, traceInfo } from './common/logging';
@@ -84,6 +84,11 @@ async function collectEnvironmentInfo(
8484
const extensionVersion = context.extension?.packageJSON?.version || 'unknown';
8585
info.push(`Extension Version: ${extensionVersion}`);
8686

87+
// Python extension version
88+
const pythonExtension = extensions.getExtension('ms-python.python');
89+
const pythonVersion = pythonExtension?.packageJSON?.version || 'not installed';
90+
info.push(`Python Extension Version: ${pythonVersion}`);
91+
8792
// Environment managers
8893
const managers = envManagers.managers;
8994
info.push(`\nRegistered Environment Managers (${managers.length}):`);

0 commit comments

Comments
 (0)