Flask Debug Toolbar is a Flask extension that aids development by adding debugging tools into the web view of your application. It gives you information on things such as the bottlenecks of your view rendering code, and how many SQLAlchemy queries it took to render the view.
As always, we will use pip to install Flask Debug Toolbar and add it to our requirements.txt file:
$ source venv/bin/activate
(venv) $ pip install -r requirements
Next, we need to add Flask Debug Toolbar to the webapp/__init__.py file. As we will be modifying this file a lot in this chapter, here is the start of the file so far, along with the code to initialize Flask Debug Toolbar:
... from flask_debugtoolbar import DebugToolbarExtension ... debug_toolbar = DebugToolbarExtension()
...
def create_app(config):
...
debug_toolbar.init_app(app)
...
This is all that is needed to get Flask Debug...