Debugging with Blurs AI
Blurs AI can help you understand and fix bugs by analyzing error messages, stack traces, and code patterns.
Error Analysis
Understanding Error Messages
Paste error messages to get explanations:
I'm getting this error: "Cannot read property 'name' of undefined"
What does it mean and how do I fix it?Blurs AI will:
- Explain what the error means
- Identify likely causes
- Suggest fixes
- Provide code examples
Stack Trace Analysis
Analyze complex stack traces:
Here's my stack trace: [paste stack trace]
Help me understand what went wrong and where.Code Debugging
Finding Bugs
Submit code for bug detection:
Review this code and identify potential bugs: [paste code]Explaining Unexpected Behavior
When code behaves unexpectedly:
This function should return the sum of numbers, but it's returning
undefined. What's wrong? [paste code]Common Debugging Scenarios
Null/Undefined Errors
I'm getting "Cannot read property 'map' of undefined" on this line:
const items = data.items.map(...)
How do I fix it?Async/Await Issues
My async function isn't working correctly: [paste code]
Help me debug the async/await logic.State Management Issues
My React component state isn't updating correctly: [paste code]
What's wrong with my state management?API Errors
My API request is failing with status 401. Help me debug: [paste code]Debugging Workflow
Step 1: Describe the Problem
Explain:
- What you expected to happen
- What actually happened
- Any error messages
- Relevant code snippets
Step 2: Get Analysis
Blurs AI will:
- Analyze the problem
- Identify likely causes
- Suggest debugging steps
- Provide potential fixes
Step 3: Apply Fixes
Try the suggested fixes:
- Test each suggestion
- Verify the fix works
- Check for side effects
Step 4: Verify
Ensure the fix:
- Solves the original problem
- Doesn't break existing functionality
- Follows best practices
Best Practices
Provide Context
Include:
- Full error messages and stack traces
- Relevant code sections
- Expected vs actual behavior
- Steps to reproduce
Be Specific
Instead of "it doesn't work", describe:
- What you're trying to do
- What happens instead
- When it happens
Include Environment Info
Mention:
- Framework and version
- Browser or runtime
- Recent changes
- Related dependencies
Advanced Debugging
Performance Issues
This function is running slowly. Help me optimize it: [paste code]Memory Leaks
I think I have a memory leak. Review this code: [paste code]Race Conditions
I'm experiencing a race condition. Help me fix it: [paste code]Tips for Effective Debugging
- Start with the error message - Most errors tell you what's wrong
- Isolate the problem - Narrow down to the specific code causing issues
- Check recent changes - Recent modifications are often the culprit
- Use step-by-step debugging - Understand the execution flow
- Test assumptions - Verify what you think is happening
Common Patterns
Pattern: Missing Null Checks
Problem: Accessing properties of undefined/null
Fix: Add null checks or optional chainingPattern: Missing Error Handling
Problem: Unhandled promise rejections
Fix: Add try/catch or .catch() handlersPattern: Incorrect Dependencies
Problem: useEffect running too often
Fix: Review dependency arraysNext Steps
- Learn about Optimization
- Check Best Practices
- Read the API Reference