.github/skills/debug-failing-test/SKILL.md
Debug a failing test using an iterative logging approach, then clean up and document the learning.
npx skillsauth add microsoft/vscode-python-environments debug-failing-testInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Debug a failing unit test by iteratively adding verbose logging, running the test, and analyzing the output until the root cause is found and fixed.
Repeat until the root cause is understood:
Add verbose logging around the suspicious code:
console.log('[DEBUG]', ...) with descriptive labelsRun the test and capture output
Assess the logging output:
Decide next action:
Remove ALL debugging artifacts:
console.log('[DEBUG]', ...) statements addedVerify the test still passes after cleanup
Provide a summary to the user (1-3 sentences):
Record the learning by following the learning instructions (if you have them):
When adding debug logging, use this format for easy identification and removal:
console.log('[DEBUG] <location>:', <value>);
console.log('[DEBUG] before <operation>:', { input, state });
console.log('[DEBUG] after <operation>:', { result, state });
// Added logging example:
console.log('[DEBUG] getEnvironments input:', { workspaceFolder });
const envs = await manager.getEnvironments(workspaceFolder);
console.log('[DEBUG] getEnvironments result:', { count: envs.length, envs });
development
VS Code settings precedence rules and common pitfalls. Essential for any code that reads or writes settings. Covers getConfiguration scope, inspect() vs get(), and multi-workspace handling.
tools
Run smoke tests to verify extension functionality in a real VS Code environment. Use this when checking if basic features work after changes.
development
Run the mandatory pre-commit checks before committing code. Includes lint, type checking, and unit tests. MUST be run before every commit.
tools
Run integration tests to verify that extension components work together correctly. Use this after modifying component interactions or event handling.