بنقرة واحدة
debug-failing-test
Debug a failing test using an iterative logging approach, then clean up and document the learning.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Debug a failing test using an iterative logging approach, then clean up and document the learning.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Critical patterns for cross-platform path handling in this VS Code extension. Windows vs POSIX path bugs are the #1 source of issues. Use this skill when reviewing or writing path-related code.
Generate a codebase health snapshot for technical debt tracking and planning. Analyzes git history, code complexity, debt markers, and dependencies to identify hotspots and refactoring priorities.
Environment manager-specific discovery patterns and known issues. Use when working on or reviewing environment discovery code for conda, poetry, pipenv, pyenv, or venv.
Run the mandatory pre-commit checks before committing code. Includes lint, type checking, and unit tests. MUST be run before every commit.
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.
Run E2E tests to verify complete user workflows like environment discovery, creation, and selection. Use this before releases or after major changes.
| name | debug-failing-test |
| description | Debug a failing test using an iterative logging approach, then clean up and document the learning. |
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 });