Tested and confirmed that @victorhcm’s approach works.
Here is what I’ve done in conda environment
Setup testing environment
conda create --name onnx_p36 python=3.6
source activate onnx_p36
Install Pytorch
git clone https://github.com/pytorch/pytorch 24
cd pytorch
NO_CUDA=1 DEBUG=1 python setup.py 25 build develop
Enter into Python shell and do “import torch” to make sure torch is successfully installed
Now you should be able to do debugging via “gdb python”