Is there a way to statically compile a C++ binary that embeds gbd or lldb, so that the debugger can be launched from within the code?
Essentially, I'd like to be able to spawn the debugger from the code without having to run the code from the debugger.
The best analogy is pasting import ipdb; ipdb.set_trace in python code to start a debugger at that line of code.