SWE-PDB: Teaching LLMs to Leverage Debugging Tools via Agentic Training
Jiaxing Liu, Xing Hu, Xin Xia
Key points
From the paper's conclusion- To address this challenge, we propose SWE-PDB , the first training-based framework that teaches LLMs to leverage debuggers for interactive debugging and program repair.
Abstract
Interaction with debugging tools enables large language models (LLMs) to reason over concrete runtime states, rather than relying solely on static analysis of source code. Specifically, with the help of a debugger, an LLM-based agent can observe actual program execution by inspecting intermediate variable states and stepping through the control flow. These runtime observations enable the model to better understand program behavior and identify the root causes of bugs. Despite these advantages, using debuggers correctly and effectively remains challenging for many models because debugger interaction is inherently stateful and requires executing complex, long-horizon action sequences. As a result, models often exhibit unproductive interactions in which the debugger is underutilized or even disrupts the debugging process. To address this challenge, we propose SWE-PDB , the first training-based framework that teaches LLMs to leverage debuggers for interactive debugging and program repair. Our approach constructs large-scale buggy Python instances with verified failing tests from diverse sources and synthesizes multi-turn interactive debugging trajectories that follow structured debugging workflows. To ensure data quality, we apply multi-stage trajectory filtering and refinement, and train models using agentic supervised fine-tuning to learn effective debugger behaviors, followed by agentic reinforcement learning with rule-based rewards to improve generalization and promote more strategic debugger usage. Extensive evaluations across diverse benchmarks demonstrate substantial gains. In particular, SWE-PDB-14B achieves 38.0% accuracy on SWE-bench Verified with complete test suites, more than tripling the base model’s performance, while improving interaction efficiency and exhibiting robust, meaningful debugger usage.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- InspectCoder: Dynamic Analysis-Driven Self Repair through Interactive LLM-Debugger CollaborationProceedings of the ACM on Programming Languages · 2026
- Pdb or Not to Be: Comparing Debugging Interfaces With Pass$_{X}$@$k$arXiv · 2026
- Do Coding Agents Still Need a Debugger? Frontier-Model-Based Fault Localization at the Accuracy CeilingarXiv · 2026
- Inducing Code Change in LLM Self-Debugging: Effects on Program RepairAI · 2026
- UserSWE: Evaluating Coding Agents in Multi-Turn Conversations with Dynamic UsersarXiv · 2026
- From Watching to Steering: Enabling Human-Coding Agent Collaboration through Execution TracesarXiv · 2026