Replies: 2 comments 4 replies
-
|
It's not possible with nvim-dap-python (as far as I Know). But you can set the break points in your c++ files and use |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the tip, I'm able to pass the path of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I currently work on a project which uses a library written in C++ which can be used in Python with pybind11. To debug the C++ code, I currently use
ipythontogether withlldb. Which works as follows:ipythonand get the process id with!ps aux | grep -i ipythonlldbin another terminal and connect toipyhtonwithattach --pid $PIDandcontinuelldbto a class method, e.g.breakpoint -n Cat::purripythonlaunch the Python script withrun examples/example.pylldbbreaks at the breakpoint and I can step through the code inlldbwhich is possible but also a bit tedious.Is there a way to set a breakpoint through
nvim-dapin C++ and then launch the Python script throughnvim-dap-pythonand have it recognize the C++ breakpoint when running the Python script?PS:
I prepared a little example project https://github.com/k0nze/nvim_cpp_python_debugging which can be set up as follows:
An example which instantiates the C++ classes in Python can be run with:
The C++ file in which I would like to set a breakpoint in is located under:
Additionally, I added a minimal
nvimconfig which installs plugins into a temporary directory which can be launched with:If the plugins don't install automatically, you can use
:PackerSyncWhen started you can launch
nvim-dapwithnvim-dap-uiwith [SPACE]+[d] and use the usual commands for setting breakpoints, and stepping though code.Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions