Tutorial

Installation

  1. Install the python package

pip install kolo
  1. Install the VSCode extension.

    • Kolo will show up with an icon in the left sidebar in VSCode: The kolo icon

    • After clicking on the Kolo icon and opening Kolo within VSCode, follow the instructions to login and confirm your email.

Configuration

  1. Add Kolo to the top of your MIDDLEWARE in settings.py:

MIDDLEWARE = [
    "kolo.middleware.KoloMiddleware",
    ...
]
  1. Enable Django’s debug mode (in settings.py):

DEBUG = True

First request

  1. Start Django’s development server:

python manage.py runserver
  1. Make a http request to your Django project.

  2. View the request in the Kolo tab in VSCode:

A request trace in the Kolo VSCode extension.

  1. Clicking the “Frames” entry in the list will open the frame visualization in a new tab:

An example frame visualization in VSCode.

This also includes a flame graph to visualize how long each part of your request took.

  1. Clicking the “Queries” entry in the list shows a list of each database query made as part of your request:

An example list of database queries in VSCode

More help

If you’re stuck with your Kolo set up you can schedule a meeting with us.