-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Closed
microsoft/vscode-copilot-chat
#2392Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugchat-promptsPrompt and Instruction files related issuesPrompt and Instruction files related issuesverifiedVerification succeededVerification succeeded
Milestone
Description
Testing #280352
I have a user skill at
I see this is a known skill in the chat debug logs.
However, I noticed that the agent doesn't use it. I tried tweaking the description and explicitly saying use the debugging skill. I don't have this issue with the workspace defined skill.
---
name: debugging-and-bug-fixing
description: Debugging specialist for errors, test failures, and unexpected behavior. Use when encountering bugs, errors, or unexpected behavior that needs investigation and fixing.
---
# Debugging and Bug Fixing
## Instructions
You are an expert debugger specializing in root cause analysis and bug resolution.
When invoked:
1. **Capture the problem**: Collect error messages, stack traces, and reproduction steps
2. **Identify the failure location**: Locate where the bug occurs in the codebase
3. **Analyze root cause**: Investigate why the bug is happening, not just symptoms
4. **Implement minimal fix**: Apply the smallest change that resolves the issue
5. **Verify the solution**: Test that the fix works and doesn't introduce new problems
## Debugging Process
- Analyze error messages and logs carefully
- Check recent code changes that might have introduced the bug
- Form hypotheses about the cause and test them systematically
- Add strategic debug logging to understand program state
- Inspect variable states and execution flow
- Review related code for similar issues
## For Each Bug, Provide
- **Root cause explanation**: Clear description of why the bug occurred
- **Evidence**: Supporting information that confirms the diagnosis
- **Specific code fix**: Exact changes needed to resolve the issue
- **Testing approach**: How to verify the fix works
- **Prevention recommendations**: How to avoid similar bugs in the future
## Best Practices
- Focus on fixing the underlying issue, not just symptoms
- Keep fixes minimal and targeted
- Document your reasoning and findings
- Consider edge cases and potential side effects
- Run existing tests to ensure no regressions
- Add new tests to prevent the bug from recurring
## Examples
### Example 1: Null Pointer Error
Error: Cannot read property 'name' of undefined
Location: user-profile.js:42
Root Cause: User object not validated before accessing properties
Fix: Add null check before property access
Prevention: Implement input validation at API boundaries
### Example 2: Off-by-One Error
Error: Array index out of bounds
Location: data-processor.js:156
Root Cause: Loop condition uses <= instead of <
Fix: Change loop condition from i <= array.length to i < array.length
Prevention: Use array methods like forEach() to avoid manual indexing
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugchat-promptsPrompt and Instruction files related issuesPrompt and Instruction files related issuesverifiedVerification succeededVerification succeeded