Changes between Version 16 and Version 17 of TracTroubleshooting
- Timestamp:
- Jan 19, 2016, 2:20:07 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracTroubleshooting
v16 v17 42 42 Now, before describing the specific debugging techniques you can use, a basic understanding of Trac's architecture is needed. 43 43 44 Trac uses a [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller model-view-controller approach]. The ''controller'' is a Python class called a "module" which inherits from the Component class and implements the `IRequestHandler` interface. A ''Component'' is the basic building block in the TracDev/ComponentArchitecture, it ''implements'' some ''Interface''s. The controller reacts on user requests and prepares the data that will be used by a template engine to fill the adequate template, in order to render the ''view'' which will besent back to the user.44 Trac uses a [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller model-view-controller approach]. The ''controller'' is a Python class called a "module" which inherits from the Component class and implements the `IRequestHandler` interface. A ''Component'' is the basic building block in the TracDev/ComponentArchitecture, it ''implements'' some ''Interface''s. The controller reacts on user requests and prepares the data that will be used by a template engine to fill the adequate template, in order to render the ''view'' which is sent back to the user. 45 45 46 46 The TracDev collection of development guides can be useful here. … … 97 97 You should be able to issue interesting commands like `pystack`, `pyframe`, `pylocals`, etc. 98 98 99 If you are using a gdb 7.x version built "`--with-python`", you can instead "`source`" [http://hg.python.org/cpython/file/2.7/Tools/gdb/libpython.py libpython.py] and use `py-bt` (see also [http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html Scripting gdb using Python]).99 If you are using a gdb 7.x version built `--with-python`, you can instead `source` [http://hg.python.org/cpython/file/2.7/Tools/gdb/libpython.py libpython.py] and use `py-bt`. See also [http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html Scripting gdb using Python]. 100 100 101 101 ==== Debugging Segmentation Faults … … 106 106 (gdb) run /opt/trac-0.10/scripts/tracd -p 8080 /srv/trac/yourproject 107 107 }}} 108 108 109 Of course, adapt the paths and the options to match what is relevant for you. 109 110 … … 115 116 }}} 116 117 117 When it crashes, do "`bt`"in order to get a full backtrace.118 Another very useful command is "`info shared`", which gives you a list of the shared libraries actually used.118 When it crashes, do `bt` in order to get a full backtrace. 119 Another very useful command is `info shared`, which gives you a list of the shared libraries actually used. 119 120 120 121 ==== Debugging a Hanging Process