Replies: 2 comments 1 reply
-
The only way I know of to do this is to have a C++ debugger that understands Python frames and translates them into Python call stacks. Visual Studio 2022 does this with its Python mixed mode debugging. Otherwise, your LLDB debugger should be able to debug the python runtime itself. You'd have to do the stack translation yourself though. For example in the VS 2022 mixed mode debugger, You can see the source for the VS 2022 mixed mode debugger here: |
Beta Was this translation helpful? Give feedback.
-
Ok thanks very much for the quick reply and great info! lldb has some suprising functionality in it via its (unwieldly) python lldb scripting api ... I wonder if I there's way to persuade lldb to interpret the python call frames ... even just to display the name of the last function in the python function callstack would be nice ... |
Beta Was this translation helpful? Give feedback.
-
I use
debugpy
from vscode to attach python debugger to a process and this lldb extension to attach lldb to processes in order to debug code in cpp python extensions.I have things setup so that for every entrypoint in my program I can choose to attach either debupy and debug the python portion of the execution or lldb and debug the cpp portion of the execution.
I would really like to be able to attach both debuggers to the same process -- such that I could see the python call stack somehow when paused at a cpp breakpoint ... Is there anyway to do that? I've tried attaching both debuggers to the same process but it seems to lead to application hanging somewhere ...
Beta Was this translation helpful? Give feedback.
All reactions