feat: comprehensive logging overhaul for better debugging and diagnostics#1488
Draft
feat: comprehensive logging overhaul for better debugging and diagnostics#1488
Conversation
- Add extension initialization progress logging (native finder, manager registration, env selection, setup complete with timings) - Add discovery START/END logging in InternalEnvironmentManager.refresh() - Fix wrong log levels: traceError→traceWarn for non-error conditions (uvPythonInstaller, nativePythonFinder), traceInfo→traceVerbose for clipboard operations - Add distinguishing context to terminal env var injector catch handlers - Add environment creation logging in envCommands - Promote setEnvironment logging to traceInfo and log unconditionally - Add pyenv discovery source logging for all lookup paths - Enhance discovery summary to include managers with 0 environments - Update tests to match traceError→traceWarn change Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
eleanorjboyd
April 27, 2026 22:56
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Overhauls logging across the extension to make debugging environment discovery and startup issues much easier for users and maintainers. The goal is that when something goes wrong (environments not found, startup stuck, selection not persisting), the Output panel logs tell a clear story of what happened and where.
Changes (10 files, +47/-25 lines)
1. Extension initialization progress (
extension.ts)Added
traceInfoat each stage boundary with timing so users can see exactly where startup gets stuck:2. Discovery START/END logging (
internal.api.ts)Every discovery operation now unconditionally logs:
[Manager] Discovering environments...at start[Manager] Discovery complete: N environments found (X.Xs)at end3. Fixed wrong log levels
uvPythonInstaller.ts:traceError→traceWarnfor curl/wget fallback (not an error)nativePythonFinder.ts:traceError→traceWarnfor global-level workspace setting (config issue, not runtime error)envCommands.ts:traceInfo→traceVerbosefor clipboard copy operations (too minor for info)4. Error context disambiguation (
terminalEnvVarInjector.ts)4 previously identical "Failed to update environment variables" error messages now have distinguishing context:
(global reload),(no workspace folder for URI),for workspace: <name>,(settings change)5. Environment creation logging (
envCommands.ts)createEnvironmentCommandandcreateAnyEnvironmentCommandnow log on success with the environment name.6. Environment selection logging (
envManagers.ts)setEnvironmentpromoted fromtraceVerbosetotraceInfoand logs unconditionally (not just when persisting settings), showing env name, ID, scope, and manager.7. Pyenv discovery parity (
pyenvUtils.ts)Added discovery source logging to match other managers (conda, pipenv, poetry):
PYENV_ROOT, home directory,pyenv-win, PATH lookup, and "not found" message. Also logs discovery count.8. Discovery summary enhancement (
telemetry/helpers.ts)logDiscoverySummarynow includes ALL managers in the summary (even those with 0 environments or errors), making it clear which managers were checked.Validation