Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions _gsocproposals/2025/proposal_XeusCpp-Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ organization:

## Description

Xeus-Cpp is an interactive execution environment for C++ in Jupyter notebooks, built on top of Clang-Repl via CppInterOp. While it provides a seamless workflow for running C++ code interactively, the lack of an integrated debugging experience remains a gap, especially when dealing with dynamically compiled code through LLVM’s JIT (Just-In-Time) execution.
xeus-cpp is an interactive execution environment for C++ in Jupyter notebooks, built on the Clang-Repl C++ interpreter, provided by [CppInterOp](https://github.com/compiler-research/CppInterOp/). While xeus-cpp enables a seamless workflow for running C++ code interactively, the lack of an integrated debugging experience remains a gap, especially when dealing with code that is dynamically compiled and executed through LLVM’s JIT(Just-In-Time) infrastructure.

Jupyter’s debugging system follows the Debug Adapter Protocol (DAP), enabling seamless integration of debuggers into interactive kernels. Existing Jupyter kernels, such as the IPython & the xeus-python kernel, have successfully implemented debugging workflows that support breakpoints, variable inspection, and execution control, even in dynamically executed environments. These implementations address challenges such as symbol resolution and source mapping for dynamically generated code, ensuring that debugging within Jupyter remains intuitive and user-friendly.

However, debugging C++ inside an interactive environment presents unique challenges, particularly due to Clang-Repl’s use of LLVM’s ORC JIT to compile and execute code dynamically. To integrate debugging into Xeus-Cpp, the project will explore existing solutions for DAP implementations like `lldb_dap` and debuggers like lldb that can interface with Jupyter while effectively supporting the execution model of Clang-Repl.
However, debugging C++ inside an interactive environment presents unique challenges, particularly due to Clang-Repl’s use of LLVM’s ORC JIT to compile and execute code dynamically. To integrate debugging into xeus-cpp, the project will explore existing solutions for DAP implementations like `lldb_dap` and debuggers like lldb that can interface with Jupyter while effectively supporting the execution model of Clang-Repl.

## Project Milestones

* Seamless debugging integration in Xeus-Cpp establishing reliable interactions between Xeus-CPP, a Debug Adapter Protocol (DAP) implementation, and a debugger.
* Implement a testing framework through xeus-zmq to thoutest the debugger thoroughly testing everything that is supposed to work. Already done for xeus-python and we can take inspiration from there.
* Seamless debugging integration, establishing reliable interactions between xeus-cpp, a Debug Adapter Protocol (DAP) implementation, and a debugger.
* Implement a testing framework through `xeus-zmq` to thoroughly test the debugger. This can be inspired by an existing implementation in `xeus-python`.
* Present the work at the relevant meetings and conferences.


## Requirements

* C/C++
* Basic understanding of Debug Adapter Protocol
* Basic understanding of the Debug Adapter Protocol
* Basic understanding of the stack used by xeus-cpp: xeus, cppinterop, clang-repl
* Research on different DAP implementations like lldb_dap and debuggers like lldb/gdb that can be utilized for the project.

Expand Down