NL-Debugging: Exploiting Natural Language as an Intermediate Representation for Code Debugging

  • 2025-05-21 11:38:50
  • Weiming Zhang, Qingyao Li, Xinyi Dai, Jizheng Chen, Kounianhua Du, Weinan Zhang, Weiwen Liu, Yasheng Wang, Ruiming Tang, Yong Yu
  • 0

Abstract

Debugging is a critical aspect of LLM's coding ability. Early debuggingefforts primarily focused on code-level analysis, which often falls short whenaddressing complex programming errors that require a deeper understanding ofalgorithmic logic. Recent advancements in large language models (LLMs) haveshifted attention toward leveraging natural language reasoning to enhancecode-related tasks. However, two fundamental questions remain unanswered: Whattype of natural language format is most effective for debugging tasks? And whatspecific benefits does natural language reasoning bring to the debuggingprocess? In this paper, we introduce NL-DEBUGGING, a novel framework thatemploys natural language as an intermediate representation to improve codedebugging. By debugging at a natural language level, we demonstrate thatNL-DEBUGGING outperforms traditional debugging methods and enables a broadermodification space through direct refinement guided by execution feedback. Ourfindings highlight the potential of natural language reasoning to advanceautomated code debugging and address complex programming challenges.

 

Quick Read (beta)

loading the full paper ...