PolyDebug:多语言调试框架
PolyDebug: A Framework for Polyglot Debugging
AI总结:
本文提出PolyDebug,一个语言无关但利用现有调试器的动态可扩展框架,通过DAP集成协调调试,以低成本支持多语言调试,并在C、JavaScript和Python上验证了其有效性与性能权衡。
摘要:
随着软件日益复杂,需要处理的问题的数量和多样性也在增加。为了应对这种多样性,开发者可能最终会在单个软件项目中使用多种编程语言,这种做法被称为多语言编程。随着能够支持多语言系统的执行平台的兴起,这种做法得到了发展势头。然而,尽管有这种势头,对于从事多语言程序开发的开发者来说,开发工具支持明显缺乏,例如在调试设施方面。并非所有多语言执行平台都提供调试能力,而对于那些提供调试能力的平台,为新语言实现支持可能成本高昂。本文通过引入一种新颖的、与语言无关但利用现有特定语言调试器的调试器框架来解决这一差距。所提出的框架是动态可扩展的,以适应多语言软件开发中使用的语言的不断演变的组合。它利用调试适配器协议(DAP)在调试会话中集成和协调现有调试器。我们发现,使用我们的方法,我们能够以很少的开发工作量实现三种不同语言的多语言调试支持。我们还发现,我们的调试器在许多场景中没有引入足以妨碍调试任务的显著开销;然而,性能确实随着多语言调用的数量而恶化,使得该方法不适合每种多语言程序结构。通过开发原型PolyDebug及其在涉及C、JavaScript和Python的用例中的应用,证明了该方法的有效性。我们在一个传统基准程序的数据集上评估了PolyDebug,这些程序被修改以适应我们的多语言程序标准。我们还通过测量原型整体及其组件的源代码行数(SLOC)来评估开发工作量。调试是开发和维护软件的基本部分。缺乏调试工具可能导致难以定位软件错误并减慢开发过程。我们相信这项工作有助于为开发者提供适当的调试支持,无论运行时环境如何。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。