PolyDebug: A Framework for Polyglot Debugging

📅 2025-02-15
🏛️ The Art, Science, and Engineering of Programming
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address the lack of debugging support in polyglot programming—where existing platforms either lack debugging capabilities or incur prohibitive costs to integrate debuggers for new languages—this paper proposes a language-agnostic, dynamically extensible cross-language debugging framework. Built upon the Debug Adapter Protocol (DAP), the framework introduces a novel dynamic pluggable architecture: lightweight, language-specific debug adapters are loaded on-demand at runtime, enabling flexible support for arbitrary language combinations without modifying or reimplementing underlying language debuggers. The design is modular, incorporating language-runtime proxies and inter-process debugging session coordination. Evaluated in a C/JavaScript/Python hybrid environment, the prototype demonstrates manageable code size, low debugging overhead, comprehensive coverage of mainstream polyglot invocation patterns (e.g., foreign function calls, embedded interpreters), and significant improvements in collaborative debugging efficiency and engineering feasibility for multilingual applications.

Technology Category

Application Category

📝 Abstract
As software grows increasingly complex, the quantity and diversity of concerns to be addressed also rises. To answer this diversity of concerns, developers may end up using multiple programming languages in a single software project, a practice known as polyglot programming. This practice has gained momentum with the rise of execution platforms capable of supporting polyglot systems. However, despite this momentum, there is a notable lack of development tooling support for developers working on polyglot programs, such as in debugging facilities. Not all polyglot execution platforms provide debugging capabilities, and for those that do, implementing support for new languages can be costly. This paper addresses this gap by introducing a novel debugger framework that is language-agnostic yet leverages existing language-specific debuggers. The proposed framework is dynamically extensible to accommodate the evolving combination of languages used in polyglot software development. It utilizes the Debug Adapter Protocol (DAP) to integrate and coordinate existing debuggers within a debugging session. We found that using our approach, we were able to implement polyglot debugging support for three different languages with little development effort. We also found that our debugger did not introduce an overhead significant enough to hinder debugging tasks in many scenarios; however performance did deteriorate with the amount of polyglot calls, making the approach not suitable for every polyglot program structure. The effectiveness of this approach is demonstrated through the development of a prototype, PolyDebug, and its application to use cases involving C, JavaScript, and Python. We evaluated PolyDebug on a dataset of traditional benchmark programs, modified to fit our criteria of polyglot programs. We also assessed the development effort by measuring the source lines of code (SLOC) for the prototype as a whole as well as its components. Debugging is a fundamental part of developing and maintaining software. Lack of debug tools can lead to difficulty in locating software bugs and slow down the development process. We believe this work is relevant to help provide developers proper debugging support regardless of the runtime environment.
Problem

Research questions and friction points this paper is trying to address.

Addresses lack of debugging tools for polyglot programming environments.
Introduces a language-agnostic debugger framework leveraging existing debuggers.
Demonstrates effectiveness with a prototype supporting C, JavaScript, and Python.
Innovation

Methods, ideas, or system contributions that make the work stand out.

Language-agnostic debugger framework leveraging DAP
Dynamically extensible for evolving polyglot languages
Integrates existing debuggers with minimal development effort
🔎 Similar Papers
No similar papers found.
P
Philémon Houdaille
University of Rennes, CNRS, Inria, France
D
D. Khelladi
University of Rennes, CNRS, France
B
Benoît Combemale
University of Rennes, France
Gunter Mussbacher
Gunter Mussbacher
Associate Professor, McGill University
Requirements Eng.Model-Driven Eng.Software Language Eng.Human ValuesSustainability
T
T. Storm
Centrum Wiskunde & Informatica (CWI), Amsterdam, The Netherlands; University of Groningen, Groningen, The Netherlands