Prompt file imported from shakesoft/Pioneree (
.github/prompts/smart-debug.prompt.md). Copyright stays with the author.
Smart Debug
AI-powered root cause analysis for runtime errors, build failures, and integration issues.
Usage
Provide the error message, exception, or symptom as context when invoking this command.
What It Does
- Parses the error message or stack trace
- Identifies the originating layer (Core, Application, EF, Angular, React)
- Searches relevant code in the failure path
- Diagnoses root cause using common ABP/ASP.NET Zero error patterns
- Proposes targeted fix with minimal changes
Common Error Patterns
| Error Pattern | Likely Root Cause |
|---|---|
AbpAuthorizationException |
Permission not granted or [AbpAuthorize] missing |
UserFriendlyException |
Business rule — read the message |
Duplicate entry in localization |
Same key in XML file twice |
EntityNotFoundException |
Wrong ID or entity soft-deleted |
| Migration build error | Model change not migrated |
NSwag 404 |
Backend changed, proxies stale |
Angular undefined property |
DTO shape changed, proxy not regenerated |
AbpValidationException |
DTO validation failure — check Data Annotations |
AbpDbConcurrencyException |
Concurrent entity modification |
?Id=[object Object] in URL |
NSwag GET/DELETE: pass raw id number, not new EntityDto({ id }) |
Diagnostic Steps
- Read the error — exact message and stack trace
- Identify the layer — which project does the top of the stack point to?
- Search for the code — find the method/class mentioned in the stack
- Check dependencies — permissions, localization, DbContext, mappers
- Propose fix — minimal change to resolve the issue
Example Usage
/smart-debug "AbpAuthorizationException: Current user did not login to the application!"
/smart-debug "The entity type 'Product' was not found in the model"
/smart-debug "Duplicate key 'Products' in localization XML"
/smart-debug "AbpValidationException: Method arguments are not valid! ?Id=[object Object]"