PracAPR for VS Code
Repairs runtime bugs in single-file Python, Java, and C++ programs using a local Ollama model (llama3.2:1b).
Use
- Open a
.py, .java, .cpp, .cc, or .cxx file.
- Right-click in the editor and choose PracAPR: Repair This File (or click the wrench at the top right).
- Review the diff. Choose Apply Fix to write it, or close the diff to discard it. Undo reverts an applied fix.
Other commands (Ctrl+Shift+P): Repair This File With Expected Output..., Apply Suggested Fix, Show Last Report, Check Environment.
Requirements
- Python 3.10+
- Ollama running locally with
llama3.2:1b (ollama pull llama3.2:1b)
- A JDK for Java files; g++ for C++ files
Run PracAPR: Check Environment to see what is missing.
Notes
- A fix marked "crash resolved; behaviour not verified" only means the program no longer fails. Use the expected-output command for a stronger check.
- The extension compiles and runs the file being repaired and the model's candidate fixes on your machine. Only use it on code you trust.
| |