How to debug underlying C++ library from Python interface?

前端 未结 1 1254
借酒劲吻你
借酒劲吻你 2021-01-22 18:17

I am using apollocaffe and Reinspect. Apollocaffe is in c++ library and Reinspect is in python. Reinspect called apis from apollocaffe. I like to debug those apis inside apolloc

1条回答
  •  囚心锁ツ
    2021-01-22 18:49

    If you are interested to debug just the C++ part, you can just start GDB with Python -

    gdb python
    b 
    run train.py
    

    Of course you need to compile Caffe with debug information: pass -DDEBUG=1 to cmake options of uncomment the DEBUG = 1 line in your Makefile.config.
    Debugging both Python and C++ from gdb might be more complicated, see this for example.

    0 讨论(0)
提交回复
热议问题