Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 11, 2025

This PR adds a "Python Environments: Report Issue" command that integrates with VS Code's built-in issue reporter, similar to the existing "Python : Report Issue" and "Python Debugger : Report Issue" commands.

Changes Made

Command Registration

  • Added python-envs.reportIssue command to package.json
  • Added localized title "Report Issue" to package.nls.json

Implementation

  • Created collectEnvironmentInfo() helper function that automatically gathers:
    • Extension version
    • Registered environment managers (id and display name)
    • Available Python environments (up to 10 listed with total count)
    • Python projects and their assigned environments
    • Current extension settings (non-sensitive data only)
  • Integrated with VS Code's workbench.action.openIssueReporter command
  • Formats collected information in markdown with collapsible details section

Fixes #162.

Copilot AI changed the title [WIP] Add python environments to report issue command Add Python Environments report issue command Jun 11, 2025
Copilot AI requested a review from eleanorjboyd June 11, 2025 16:54
Copilot finished work on behalf of eleanorjboyd June 11, 2025 16:54

try {
// Extension version
const extensionVersion = context.extension?.packageJSON?.version || 'unknown';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be useful to get the version of the python extension too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added Python extension version to the report issue output in commit fd9b8c9. The function now collects both the Python Environments extension version and the Python extension version to help with debugging compatibility issues.

Copilot finished work on behalf of eleanorjboyd June 11, 2025 18:15
info.push(`Extension Version: ${extensionVersion}`);

// Python extension version
const pythonExtension = extensions.getExtension('ms-python.python');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karthiknadig ideas on other info we need that will be useful? Still need test everything it is getting here but wanted to get your thoughts on if there is any info I can add

@eleanorjboyd
Copy link
Member

Example

Extension Version: 0.3.0-dev
Python Extension Version: 2025.7.2025060501

Registered Environment Managers (4):
  - ms-python.python:system (Global)
  - ms-python.python:venv (venv)
  - ms-python.python:conda (Conda)
  - ms-python.python:pyenv (PyEnv)
  Error getting environments from ms-python.python:conda: Error: Failed to run "conda info --envs --json":
 /bin/sh: C:UsersUseranaconda3Scriptsconda.exe: command not found


Total Available Environments: 10
Environment Details:
  1. Python 3.13.4 (homebrew) (3.13.4.final.0) - /opt/homebrew/bin/python3
  2. Python 3.12.11 (homebrew) (3.12.11.final.0) - /opt/homebrew/bin/python3.12
  3. Python 3.11.13 (homebrew) (3.11.13.final.0) - /opt/homebrew/bin/python3.11
  4. Python 3.10.18 (homebrew) (3.10.18.final.0) - /opt/homebrew/bin/python3.10
  5. Python 3.9.6 (3.9.6.final.0) - /usr/bin/python3
  6. Python 3.8.20 (homebrew) (3.8.20.final.0) - /opt/homebrew/bin/python3.8
  7. .venv (3.13.4) (3.13.4) - /Users/eleanorboyd/python-envs-scenarios/blank-folder/.venv/bin/python
  8. .venv-1 (3.13.4) (3.13.4) - /Users/eleanorboyd/python-envs-scenarios/blank-folder/.venv-1/bin/python
  9. .venv-2 (3.13.4) (3.13.4) - /Users/eleanorboyd/python-envs-scenarios/blank-folder/.venv-2/bin/python
  10. pyenv (3.11.9) (3.11.9) - /Users/eleanorboyd/.pyenv/versions/3.11.9

Python Projects (1):
  1. /Users/eleanorboyd/python-envs-scenarios/blank-folder
     Environment: .venv-2 (3.13.4)

Extension Settings:
  Default Environment Manager: ms-python.python:venv
  Default Package Manager: ms-python.python:pip
  Terminal Auto Activation: command

@eleanorjboyd eleanorjboyd marked this pull request as ready for review June 12, 2025 18:30
@eleanorjboyd eleanorjboyd enabled auto-merge (squash) June 12, 2025 18:30
auto-merge was automatically disabled June 13, 2025 17:53

Pull request was closed

@eleanorjboyd eleanorjboyd reopened this Jun 13, 2025
@eleanorjboyd eleanorjboyd merged commit cfc8ee9 into main Jun 13, 2025
14 checks passed
@eleanorjboyd eleanorjboyd deleted the copilot/fix-162 branch June 13, 2025 18:21
NguyenCuong1989 referenced this pull request in NguyenCuong1989/vscode-python-environments Oct 23, 2025
This PR adds a "Python Environments: Report Issue" command that
integrates with VS Code's built-in issue reporter, similar to the
existing "Python : Report Issue" and "Python Debugger : Report Issue"
commands.

## Changes Made

### Command Registration
- Added `python-envs.reportIssue` command to `package.json`
- Added localized title "Report Issue" to `package.nls.json`

### Implementation
- Created `collectEnvironmentInfo()` helper function that automatically
gathers:
  - Extension version
  - Registered environment managers (id and display name)
  - Available Python environments (up to 10 listed with total count)
  - Python projects and their assigned environments
  - Current extension settings (non-sensitive data only)
- Integrated with VS Code's `workbench.action.openIssueReporter` command
- Formats collected information in markdown with collapsible details
section

Fixes #162.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: eleanorjboyd <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add python environments to report issue command

4 participants