title: Eclipse: debug shared library loaded from python
body: <p>In Linux, I am trying to debug the C++ code of a shared library which is loaded from Python code. The loading is done using the <code>ctypes</code> package. In Eclipse, I set breakpoints both in the Python and in the C++ code, however Eclipse just skips the breakpoints in the C++ code (breakpoints in the Python code work OK). </p>
  
  <p>I have tried using <code>attach to application</code> in Eclipse (under Debug Configurations) and choosing the Python process, but it didn't change anything. In the <code>attach to application</code> dialog box I choose the shared library as the Project, and I choose <code>/usr/bin/python2.6</code> as the <code>C/C++ application</code>. Is that the correct way?</p>
  
  <p>I've tried it both before running the python code, and after a breakpoint in the Python code was caught, just before the line calling a function of the shared library.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Meanwhile I am using a workaround of calling the python code and debugging using a gdb command-line session by attaching to the python process. But I would like to hear a solution to doing this from within Eclipse.</p>