Coding with Eyes: Visual Feedback Unlocks Reliable GUI Code Generating and Debugging
Organizations: Shenzhen Institute for Advanced Study, University of Electronic Science and Technology of China
Abstract
Recent advances in Large Language Model (LLM)-based agents have shown remarkable progress in code generation. However, current agent methods mainly rely on text-output-based feedback (e.g. command-line outputs) for multi-round debugging and struggle in graphical user interface (GUI) that involve visual information. This is mainly due to two limitations: 1) GUI programs are event-driven, yet existing methods cannot simulate user interactions to trigger GUI element logic 2) GUI programs possess visual attributes, making it difficult for text-based approaches to assess whether the rendered interface meets user needs. To systematically address these challenges, we first introduce InteractGUI Bench, a novel benchmark comprising 984 commonly used real-world desktop GUI application tasks designed for fine-grained evaluation of both interaction logic and visual structure. Furthermore, we propose VF-Coder, a vision-feedback-based multi-agent system for debugging GUI code. By perceiving visual information and directly interacting with program interfaces, VF-Coder can identify potential logic and layout issues in a human-like manner. On InteractGUI Bench, our VF-Coder approach increases the success rate of Gemini-3-Flash from 21.68% to 28.29% and raises the visual score from 0.4284 to 0.5584, indicating the effectiveness of visual feedback in GUI debugging.
Figures & tables
| Model | % Resolved ↑ | | $ Avg. Cost ↓ | | Avg. Visual Score ↑ | FS ↓ | AE ↑ | AC ↑ | CK ↑ |
|---|---|---|---|---|---|---|---|
| GPT-5.2 | 26.99 | 0.1746 | 0.4839 | 14.53 | 58.28 | 67.53 | 72.52 |
| Claude-4.5-Sonnet | 23.18 | 0.1563 | 0.3378 | 15.57 | 53.94 | 62.75 | 66.50 |
| Gemini-3.1-Pro | 23.57 | 0.2076 | 0.4816 | 21.66 | 51.47 | 57.36 | 61.03 |
| Gemini-3-Flash | 21.68 | 0.0147 | 0.4284 | 25.20 | 49.05 | 58.35 | 58.62 |
| Kimi-2.5 | 11.31 | 0.0202 | 0.3867 | 27.08 | 34.04 | 45.86 | 45.77 |
| Method | % Resolved ↑ | | $ Avg. Cost ↓ | | Avg. Visual Score ↑ | FS ↓ | AE ↑ | AC ↑ | CK ↑ |
|---|---|---|---|---|---|---|---|
| Gemini-3-Flash | 21.68 | 0.0147 | 0.4284 | 25.20 | 49.05 | 58.35 | 58.62 |
| +Gemini CLI | 24.81 | 0.1309 | 0.5190 | 7.14 | 50.69 | 66.91 | 61.66 |
| +Cursor CLI | 25.46 | 0.1726 | 0.5028 | 1.59 | 53.45 | 66.95 | 73.64 |
| +VF-Coder | 28.29 | 0.2064 | 0.5584 | 4.47 | 58.41 | 75.93 | 71.33 |
| Method | % Resolved ↑ | Avg. Visual Score ↑ | FS ↓ | AE ↑ | AC ↑ | CK ↑ |
|---|---|---|---|---|---|---|
| Kimi-K2.5 | 16.25 | 0.4865 | 10.00 | 43.67 | 44.73 | 42.28 |
| +Kimi Agent | 18.75 | 0.5648 | 1.25 | 54.28 | 61.04 | 52.31 |
| +VF-Coder | 25.00 | 0.5530 | 3.75 | 52.50 | 66.04 | 61.66 |
| Debugging | Fixing | % Resolved ↑ | | $ Avg. Cost ↓ | | Avg. Visual Score ↑ | FS ↓ | AE ↑ | AC ↑ | CK ↑ | |
|---|---|---|---|---|---|---|---|---|---|
| w/o GUI Operator | textual | textual | 24.79 | 0.1351 | 0.5193 | 3.25 | 50.69 | 61.91 | 59.63 |
| w/o bug screenshot | visual | textual | 27.64 | 0.1963 | 0.5390 | 5.28 | 53.45 | 66.95 | 73.64 |
| Full | visual | visual | 28.29 | 0.2064 | 0.5584 | 4.47 | 58.41 | 75.93 | 71.33 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Size | Input Type | Eval Scope | Eval Method | GR↑ | CHA↑ |
|---|---|---|---|---|---|---|
| HumanEval [ 5 ] | 164 | text | Code | Rule-based | Low | High |
| Design2Code [ 23 ] | 484 | image | WebUI | Model-based | High | Mid |
| FrontendBench [ 42 ] | 148 | text | WebUI | Rule-based | Mid | High |
| WebGen-Bench [ 20 ] | 101 | text | WebUI | Model-based | Mid | Mid |
| InteractGUI Bench | 984 | image+text | DesktopUI | Rule-based + Model-based | High | High |
| Method | Block ↑ | Text ↑ | Position ↑ | Color ↑ | CLIP ↑ |
|---|---|---|---|---|---|
| Direct | 76.04 | 96.43 | 88.04 | 87.78 | 90.64 |
| Text-Augment | 73.47 | 93.70 | 82.89 | 83.20 | 89.89 |
| Self-Revision | 78.09 | 98.65 | 87.53 | 87.85 | 91.28 |
| VF-Coder (Ours) | 77.83 | 96.31 | 88.15 | 89.09 | 91.07 |
| Method | Yes | Partial | No | Start Failed ↓ | Accuracy ↑ | Appearance Score ↑ |
|---|---|---|---|---|---|---|
| Bolt.diy | 28.6 | 6.3 | 50.4 | 14.7 | 31.8 | 2.74 |
| VF-Coder (Ours) | 38.5 | 6.6 | 40.2 | 14.7 | 41.8 | 3.96 |
| Method | Instruction Categories | Test Case Categories | ||||
|---|---|---|---|---|---|---|
| Content | User | Data | Functional | Data | Design | |
| Presentation | Interaction | Management | Testing | Display | Validation | |
| Testing | Testing | |||||
| Bolt.diy | 25.9 | 32.7 | 36.2 | 24.5 | 36.6 | 44.7 |
| VF-Coder (Ours) | 45.1 | 38.3 | 45.0 | 30.8 | 50.8 | 58.6 |
Code Generation
Code generation studies methods for turning natural-language, visual, or formal specifications into executable programs and code edits.
See all 313 papers