title: Cython debugging, put a break point
body: <p>I am trying to use cython debugger to put in a break point:</p>
  
  <p>Here is my code:</p>
  
  <p><strong>cython_file.pyx</strong></p>
  
  <pre><code>cimport cython
  
  def big_sum():
      cdef int a[10000]
  
      for i in range(10000):
          a[i] = i
      # &lt;==================== I want to put a break here     
      cdef int my_sum
      my_sum = 0
      for i in range(1000):
          my_sum += a[i]
      return my_sum
  </code></pre>
  
  <p><strong>python_file.py</strong></p>
  
  <pre><code>from cython_file import big_sum
  
  result = big_sum()
  print result
  </code></pre>
  
  <p><strong>setup.py</strong></p>
  
  <pre><code>from distutils.core import setup
  from distutils.extension import Extension
  from Cython.Distutils import build_ext
  
  setup(
      cmdclass = {'build_ext': build_ext},
      ext_modules = [Extension("cython_file",
                               ["cython_file.pyx"], pyrex_gdb=True,
                               extra_compile_args=["-g"], extra_link_args=["-g"])]
  )
  </code></pre>
  
  <p>I was following this <a href="https://sage.math.washington.edu:8091/hudson/job/cython-docs/doclinks/1/src/userguide/debugging.html" rel="noreferrer">guide</a>:</p>
  
  <p>This is what I did in the ubuntu shell:</p>
  
  <pre><code>cython --gdb cython_file.pyx
  python setup.py build_ext --inplace
  cygdb
  </code></pre>
  
  <p>Now I am inside the debugger, and I should be able to put in a break point, but when i 
  try:</p>
  
  <pre><code>(gdb) cy break cython_file.big_sum :8
  
  I get this error:
  
  Function "__pyx_pw_11cython_file_1big_sum" not defined.
  Breakpoint 1 (__pyx_pw_11cython_file_1big_sum) pending.
  No frame is currently selected.
  </code></pre>
  
  <p>How should I set the break point correctly?</p>
  
  <p><strong>Update</strong>: I still have a problem even when I use setup.py provided by Drew McInnis:</p>
  
  <pre><code>user@Ubuntu-K56CA:~/PythonStuff/CythonStuff/cython_debug_2$ cython --gdb cython_file.pyx
  user@Ubuntu-K56CA:~/PythonStuff/CythonStuff/cython_debug_2$ python setup.py build_ext --inplace
  /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'extensions'
    warnings.warn(msg)
  running build_ext
  building 'cython_file' extension
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c cython_file.c -o build/temp.linux-x86_64-2.7/cython_file.o
  gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/cython_file.o -o /home/user/PythonStuff/CythonStuff/cython_debug_2/cython_file.so
  user@Ubuntu-K56CA:~/PythonStuff/CythonStuff/cython_debug_2$ cygdb .
  GNU gdb (GDB) 7.5-ubuntu
  Copyright (C) 2012 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-linux-gnu".
  For bug reporting instructions, please see:
  &lt;http://www.gnu.org/software/gdb/bugs/&gt;.
  (gdb) cy run python_file.py
  499500
  
  
  (gdb) cy break cython_file.big_sum
  Breakpoint 1 at 0x7ffff63e7780: file cython_file.c, line 649.
  (gdb) cy run python_file.py
  1    cimport cython
  </code></pre>
  
  <p>I notice that I get this warning:</p>
  
  <pre><code>user@Ubuntu-K56CA:~/PythonStuff/CythonStuff/cython_debug_2$ python setup.py build_ext --inplace
  
  /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'extensions
  </code></pre>
  
  <p>Could that be the problem?</p>
  
  <p>I am using Cython version 0.19.1, Python 2.7.3, and ubuntu 12.10.</p>