|
| 1 | +--- |
| 2 | +title: Implementing Debugging Support |
| 3 | +layout: gsoc_proposal |
| 4 | +project: Xeus-Cpp |
| 5 | +year: 2025 |
| 6 | +difficulty: medium |
| 7 | +duration: 350 |
| 8 | +mentor_avail: June-October |
| 9 | +organization: |
| 10 | + - CompRes |
| 11 | +--- |
| 12 | + |
| 13 | +## Description |
| 14 | + |
| 15 | +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. |
| 16 | + |
| 17 | +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. |
| 18 | + |
| 19 | +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. |
| 20 | + |
| 21 | +## Project Milestones |
| 22 | + |
| 23 | +* Seamless debugging integration in Xeus-Cpp establishing reliable interactions between Xeus-CPP, a Debug Adapter Protocol (DAP) implementation, and a debugger. |
| 24 | +* 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. |
| 25 | +* Present the work at the relevant meetings and conferences. |
| 26 | + |
| 27 | + |
| 28 | +## Requirements |
| 29 | + |
| 30 | +* C/C++ |
| 31 | +* Basic understanding of Debug Adapter Protocol |
| 32 | +* Basic understanding of the stack used by xeus-cpp: xeus, cppinterop, clang-repl |
| 33 | +* Research on different DAP implementations like lldb_dap and debuggers like lldb/gdb that can be utilized for the project. |
| 34 | + |
| 35 | +## Mentors |
| 36 | +* **[Anutosh Bhat ](mailto:[email protected])** |
| 37 | +* [Johan Mabille ](mailto:[email protected]) |
| 38 | +* [Vipul Cariappa ](mailto:[email protected]) |
| 39 | +* [Aaron Jomy ](mailto:[email protected]) |
| 40 | + |
| 41 | +## Links |
| 42 | +* [Repo](https://github.com/compiler-research/xeus-cpp) |
| 43 | +* [Debug Adaptor Protocol](https://microsoft.github.io/debug-adapter-protocol/) |
| 44 | +* Debugging support through Jupyter: |
| 45 | + - https://jupyterlab.readthedocs.io/en/stable/user/debugger.html |
| 46 | + - https://jupyter-client.readthedocs.io/en/latest/messaging.html#debug-request |
0 commit comments