Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
2189277a
Commit
2189277a
authored
Nov 20, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some references to old "build_ext" building way in cygdb docs
parent
87a9bc29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
docs/src/userguide/debugging.rst
docs/src/userguide/debugging.rst
+10
-14
No files found.
docs/src/userguide/debugging.rst
View file @
2189277a
...
...
@@ -16,22 +16,18 @@ installation).
The
debugger
will
need
debug
information
that
the
Cython
compiler
can
export
.
This
can
be
achieved
from
within
the
setup
script
by
passing
``
pyrex_gdb
=
True
``
to
your
Cython
Extenion
class
::
script
by
passing
``
gdb_debug
=
True
``
to
``
cythonize
()``
::
from
Cython
.
Distutils
import
extension
from
distutils
.
code
import
setup
from
distutils
.
extension
import
Extension
ext
=
extension
.
Extension
(
'source'
,
[
'source.pyx'
],
pyrex_gdb
=
True
)
setup
(...,
ext_modules
=[
ext
])
extensions
=
[
Extension
(
'source'
,
[
'source.pyx'
])]
With
this
approach
debug
information
can
be
enabled
on
a
per
-
module
basis
.
Another
(
easier
)
way
is
to
simply
pass
the
``--
pyrex
-
gdb
``
flag
as
a
command
line
argument
::
setup
(...,
ext_modules
=
cythonize
(
extensions
,
gdb_debug
=
True
))
python
setup
.
py
build_ext
--
pyrex
-
gdb
For
development
it
's often easy to use the ``--inplace`` flag also, which makes
distutils build your project "in place", i.e., not in a separate `build`
directory.
For
development
it
's often helpful to pass the ``--inplace`` flag to
the ``setup.py`` script, which makes distutils build your project
"in place", i.e., not in a separate `build` directory.
When invoking Cython from the command line directly you can have it write
debug information using the ``--gdb`` flag::
...
...
@@ -45,7 +41,7 @@ Running the Debugger
To run the Cython debugger and have it import the debug information exported
by Cython, run ``cygdb`` in the build directory::
$ python setup.py build_ext --
pyrex-gdb --
inplace
$ python setup.py build_ext --inplace
$ cygdb
GNU gdb (GDB) 7.2
...
...
...
@@ -58,7 +54,7 @@ installed and managed by your package manager you probably need to install debug
support
separately
,
e
.
g
.
for
ubuntu
::
$
sudo
apt
-
get
install
python
-
dbg
$
python
-
dbg
setup
.
py
build_ext
--
pyrex
-
gdb
--
inplace
$
python
-
dbg
setup
.
py
build_ext
--
inplace
Then
you
need
to
run
your
script
with
``
python
-
dbg
``
also
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment