Protocol-Based Interactive Debugging for Domain-Specific Languages

By: Josselin Enet, Erwan Bousse, Massimo Tisi, Gerson Sunyé

Abstract

Interactive debuggers are established tools used by developers to understand programs and localize faults. They are equally valuable in the context of model-driven development, when working on executable behavioral models. However, development costs of interactive debuggers for Domain-Specific Languages (DSLs) can be significant. In order to mitigate these costs, several reusable DSL-agnostic debugging solutions have been proposed. We argue that the applicability of these solutions is limited by being tied to a fixed set of debugging services, a specific language engineering approach, or a particular user interface. In this paper, we present a novel approach to provide interactive debugging services for executable DSLs through a reusable generic architecture. We propose a protocol allowing a generic interactive debugger to communicate with heterogeneous DSL runtimes, both for controlling the execution and for configuring the debugger with domain-specific breakpoints. The proposed debugger can itself be controlled using a reinterpretation of the Debug Adapter Protocol (DAP), for an effortless integration in existing Integrated Development Environments (IDEs) that support it. Using a prototype implementation based on JSON-RPC and two heterogeneous DSL runtimes, we show that our approach provides an off-the-shelf reusable interactive debugger that supports meaningful domain-specific breakpoints, and that can be used with minimal effort within an IDE such as Visual Studio Code.

Keywords

Domain-specific languages, Debugging, Language tooling.

Cite as:

Josselin Enet, Erwan Bousse, Massimo Tisi, Gerson Sunyé, “Protocol-Based Interactive Debugging for Domain-Specific Languages”, Journal of Object Technology, Volume 22, no. 2 (July 2023), pp. 2:1-14, doi:10.5381/jot.2023.22.2.a6.

PDF | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn

The JOT Journal   |   ISSN 1660-1769   |   DOI 10.5381/jot   |   AITO   |   Open Access   |    Contact