system bug fixer

System Bug Fixer Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "system bug fixer" with this command: npx skills add chrysaliscat/designgraduation/chrysaliscat-designgraduation-system-bug-fixer

System Bug Fixer Skill

  1. Objective

To rapidly identify, isolate, and resolve system anomalies such as:

  • Service startup failures (Port conflicts, DB connection errors)

  • Persistent "Ghost" Data (Menu items that won't disappear)

  • Logic inconsistencies between Frontend and Backend

  • Caching issues (Redis, Browser, Vuex)

  1. Methodology

Phase 1: The Health Check (Stop & Clear)

Before debugging a weird issue, ensure the environment is clean.

  • Kill Zombie Processes: taskkill /F /IM java.exe

  • Clear Ports: Check if 8080/6379 are truly free.

  • Restart Middleware: Restart Redis/MySQL if data seems "stuck".

  • Flush Logs: Rename backend.log (e.g., backend.log.old ) to ensure you are reading fresh logs.

Phase 2: Deep Log Analysis

Do not trust the UI. Trust the Logs.

  • Enable Debug Logging:

  • Add log.info("DEBUG_TRACE: Variable={}", var) in critical logical paths.

  • If utilizing MyBatis, inspect the ==> Preparing: SQL output.

  • Result Verification:

  • Does <== Total: 0 match your expectation?

  • Did the code actually reach your log.info ? If not, check try-catch blocks swallowing exceptions.

Phase 3: Data Integrity Verification

Code is often correct, but Data is wrong.

  • Direct DB Query: Use MySQL CLI/Workbench to query the raw data.

  • Example: SELECT * FROM sys_menu WHERE menu_name LIKE '%Cart%';

  • Compare menu_id in DB vs Code Hardcoding.

  • Cache vs Source:

  • Redis: FLUSHALL (in Dev) to rule out stale permissions.

  • User Permissions: Logout and Re-login to refresh Subject principal.

Phase 4: The "Nuclear" Option (Hardcoding & Isolation)

If logic seems inexplicably skipped:

  • Isolate: Create a localized test case (e.g., a specific if block).

  • Hardcode: Temporarily hardcode IDs to confirm control.

  • Example: if (id == 2021) remove();

  • Broaden Scope: Use toLowerCase() and .contains() instead of equals() .

  1. Common Fix Patterns (RuoYi Specific)

Menu/Permission Persistence

  • Symptom: Menu visible after Role revocation.

  • Fix: Check SysMenuServiceImpl.selectMenuTreeByUserId . Ensure getChildPerms isn't caching an old tree. Force backend restart.

Port In Use (8080)

  • Symptom: "Web server failed to start".

  • Fix: netstat -ano | findstr :8080 taskkill /PID <PID> /F

Frontend Not Updating

  • Symptom: Code changed, UI stuck.

  • Fix: npm run build:prod might be needed if not running dev . Disable Browser Cache (DevTools -> Network -> Disable Cache).

  1. Verification

After applying a fix:

  • Clean Start: Restart backend.

  • Clean Login: Logout -> Clear Browser Cache -> Login.

  • Log Confirmation: Verify the specific log entry for the fix appears.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

ui/ux pro max

No summary provided by upstream source.

Repository SourceNeeds Review
General

web test case generator

No summary provided by upstream source.

Repository SourceNeeds Review
General

debugging-with-tools

No summary provided by upstream source.

Repository SourceNeeds Review
General

debugging expert

No summary provided by upstream source.

Repository SourceNeeds Review