datasette-pretty-traces by simonw
172 downloads this week Star
README source code
Prettier formatting for ?_trace=1
traces
Install this plugin in the same environment as Datasette.
$ datasette install datasette-pretty-traces
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.
You can try out the demo here:
- /?_trace=1 tracing the homepage
- /github/commits?_trace=1 tracing a table page
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