One related bit of information is PyCharm has a breakpoint Suspend Policy, which can be set either to thread or application (can be configured by right clicking on breakpoint red knob), but in this case it still doesn’t fix the issue with callback from C API wrapper.
However when combining that with this the solution from this stackoverflow answer, it seems to now work for me:

  
      stackoverflow.com
  
  
      
    
  

  Not working python breakpoints in C thread in pycharm or eclipse+pydev 44



  eclipse, multithreading, debugging, pycharm



  asked by
  
  
    Alek Kowalczyk
  
  on 08:47PM - 15 Dec 15


  
  
    
    
  
  


So, first thing in your backward function, add the following
import pydevd
pydevd.settrace(suspend=False, trace_only_current_thread=True)