datasette-pretty-traces

Prettier formatting for ?_trace=1 traces


Keywords
datasette, datasette-io, datasette-plugin
License
Apache-2.0
Install
pip install datasette-pretty-traces==0.4

Documentation

datasette-pretty-traces

PyPI Changelog Tests License

Prettier formatting for ?_trace=1 traces

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-pretty-traces

Usage

Once installed, run Datasette using --setting trace_debug 1:

datasette fixtures.db --setting trace_debug 1

Then navigate to any page and add ?_trace= to the URL:

http://localhost:8001/?_trace=1

The plugin will scroll you down the page to the visualized trace information.

Demo

You can try out the demo here:

Screenshot

Screenshot showing the visualization produced by the plugin

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-pretty-traces
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest