summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial/debugtoolbar.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2014-05-23 14:57:01 -0400
committerChris McDonough <chrism@plope.com>2014-05-23 14:57:01 -0400
commitd76bdb514c92ee1fd9b1bd67387d15d34ea28bb3 (patch)
tree36784e20002ecc4cb6675901b3cc2bda36e54caa /docs/quick_tutorial/debugtoolbar.rst
parent0c5bb0aa329239df877ccb053280e398766eb434 (diff)
parentc740e8bd20c049cbab43ce0a1cd5a4533fe6b849 (diff)
downloadpyramid-d76bdb514c92ee1fd9b1bd67387d15d34ea28bb3.tar.gz
pyramid-d76bdb514c92ee1fd9b1bd67387d15d34ea28bb3.tar.bz2
pyramid-d76bdb514c92ee1fd9b1bd67387d15d34ea28bb3.zip
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/quick_tutorial/debugtoolbar.rst')
-rw-r--r--docs/quick_tutorial/debugtoolbar.rst39
1 files changed, 32 insertions, 7 deletions
diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst
index d25588c49..90750c633 100644
--- a/docs/quick_tutorial/debugtoolbar.rst
+++ b/docs/quick_tutorial/debugtoolbar.rst
@@ -39,7 +39,6 @@ Steps
$ $VENV/bin/python setup.py develop
$ $VENV/bin/easy_install pyramid_debugtoolbar
-
#. Our ``debugtoolbar/development.ini`` gets a configuration entry for
``pyramid.includes``:
@@ -72,18 +71,44 @@ supports wiring in add-on configuration via our ``development.ini``
using ``pyramid.includes``. We use this to load the configuration for
the debugtoolbar.
-You'll now see an attractive (and collapsible) menu in the right of
-your browser, providing introspective access to debugging information.
-Even better, if your web application generates an error,
+You'll now see an attractive button on the right side of
+your browser, which you may click to provide introspective access to debugging
+information in a new browser tab. Even better, if your web application
+generates an error,
you will see a nice traceback on the screen. When you want to disable
this toolbar, no need to change code: you can remove it from
``pyramid.includes`` in the relevant ``.ini`` configuration file (thus
showing why configuration files are handy.)
-Note that the toolbar mutates the HTML generated by our app and uses jQuery to
-overlay itself. If you are using the toolbar while you're developing and you
+Note injects a small amount of html/css into your app just before the closing
+``</body>`` tag in order to display itself. If you
start to experience otherwise inexplicable client-side weirdness, you can shut
it off by commenting out the ``pyramid_debugtoolbar`` line in
``pyramid.includes`` temporarily.
-.. seealso:: See Also: :ref:`pyramid_debugtoolbar <toolbar:overview>`
+.. seealso:: See also :ref:`pyramid_debugtoolbar <toolbar:overview>`.
+
+Extra Credit
+============
+
+# Why don't we add ``pyramid_debugtoolbar`` to the list of
+ ``install_requires`` dependencies in ``debugtoolbar/setup.py``?
+
+# Introduce a bug into your application: Change:
+
+ .. code-block:: python
+
+ def hello_world(request):
+ return Response('<body><h1>Hello World!</h1></body>')
+
+ to:
+
+ .. code-block:: python
+
+ def hello_world(request):
+ return xResponse('<body><h1>Hello World!</h1></body>')
+
+ Save, and visit http://localhost:6543/ again. Notice the nice
+ traceback display. On the lowest line, click the "screen" icon to the
+ right, and try typing the variable names ``request`` and ``Response``.
+ What else can you discover?