SmartDebug Assistant is a tool that transforms standard error messages into actionable, educational solutions. It helps developers learn through their mistakes by providing context-aware solutions, explanations, and learning resources.
- Error message analysis and classification
- Context-aware solutions based on your code
- Educational explanations of common programming errors
- Syntax-highlighted code examples
- Support for multiple programming languages (currently focused on Python)
smart-debug/
├── backend/ # FastAPI backend
│ ├── main.py # Main API code
│ └── requirements.txt # Python dependencies
├── frontend/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ │ └── ErrorAnalyzer.js # Main React component
│ │ ├── App.js
│ │ └── index.js
│ ├── package.json
│ └── ...
└── README.md
- Python 3.8+
- Node.js 14+
- npm or yarn
- Create the backend directory and files: or simply clone the repo
mkdir -p smart-debug/backend
cd smart-debug/backend- Create a requirements.txt file:
echo "fastapi==0.95.1
uvicorn==0.22.0
pydantic==1.10.7" > requirements.txtAlso pip install google-generativeai
- Install the dependencies:
pip install -r requirements.txt- Create the main.py file with the provided FastAPI code
- Create a new React application:
npx create-react-app smart-debug/frontend
cd smart-debug/frontend- Install the required dependencies:
npm install prismjs @uiw/react-prismjscd smart-debug/backend
uvicorn main:app --reloadThe API will be available at http://localhost:8000
cd smart-debug/frontend
npm startThe web application will be available at http://localhost:3000
- Enter an error message in the provided text area
- Optionally, add the code context where the error occurred
- Select the programming language
- Click "Analyze Error"
- View the analysis results, including:
- Error type identification
- Possible solutions with explanations
- Code examples with syntax highlighting
- Related programming concepts
POST /analyze_error- Analyze an error messageGET /supported_languages- Get a list of supported programming languages