How to debug underlying C++ library from Python interface? -
i using apollocaffe , reinspect. apollocaffe in c++ library , reinspect in python. reinspect called apis apollocaffe. debug apis inside apollocaffe. python code, used
python -m pdb train.py
but can't go inside api apollocaffe. cout << "test" << endl; in apollocaffe
. nothing printed console. how can debug c++ code, @ least if can print, great.
if interested debug c++ part, can start gdb python -
gdb python b <c++ function break at> run train.py
of course need compile caffe debug information: pass -ddebug=1 cmake options of uncomment debug = 1
line in makefile.config.
debugging both python , c++ gdb might more complicated, see this example.
Comments
Post a Comment