-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdebugging-standards.mdc
More file actions
38 lines (28 loc) · 977 Bytes
/
Copy pathdebugging-standards.mdc
File metadata and controls
38 lines (28 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
description: Standards for debugging and error handling
globs: *.php, *.js, *.ts, *.vue, *.jsx, *.tsx, *.py
---
# Debugging Standards
Ensures proper debugging practices and error handling.
## Rule Details
- **Name:** debugging_standards
- **Description:** Enforce standards for debugging and error handling
## Filters
- file extension pattern: `\\.(php|js|ts|vue|jsx|tsx|py)$`
## Enforcement Checks
- Conditions:
- pattern `console\\.log\\(|print_r\\(|var_dump\\(` – Replace debug statements with proper logging
- pattern `catch\\s*\\([^)]*\\)\\s*\\{\\s*\\}` – Implement proper error handling in catch blocks
## Suggestions
- Guidance:
Debugging Best Practices:
- Address root causes, not symptoms
- Add descriptive logging messages
- Create isolated test functions
- Implement comprehensive error handling
- Use appropriate logging levels
- Add context to error messages
- Consider debugging tools integration
## Metadata
- Priority: high
- Version: 1.1