Prettier formatting for ?_trace=1 traces

Overview

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
You might also like...

Lightweight and simple JS date formatting and parsing

fecha Lightweight date formatting and parsing (~2KB). Meant to replace parsing and formatting functionality of moment.js. NPM npm install fecha --save

Jan 5, 2023

For formatting, searching, and rewriting JavaScript.

jsfmt For formatting, searching, and rewriting JavaScript. Analogous to gofmt. Installation npm install -g jsfmt Usage $ jsfmt --help Usage: jsfmt [

Dec 9, 2022

autoNumeric is a standalone library that provides live as-you-type formatting for international numbers and currencies.

autoNumeric is a standalone library that provides live as-you-type formatting for international numbers and currencies.

What is autoNumeric? autoNumeric is a standalone Javascript library that provides live as-you-type formatting for international numbers and currencies

Dec 16, 2022

⚡️ Fast parsing, formatting and timezone manipulations for dates

node-cctz CCTZ is a C++ library for translating between absolute and civil times using the rules of a time zone. Install You will need C++11 compatibl

Oct 3, 2022

This project was developed to practice Front-end and Back-end comunication, data formatting, http requests GET, POST, DELETE, form validation, it also consumes a rest API

This project was developed to practice Front-end and Back-end comunication, data formatting, http requests GET, POST, DELETE, form validation, it also consumes a rest API

React Application 💻 Demonstration of the application | Features | Technologies used | Application installation 💻 Demonstration of the application Ap

May 17, 2022

Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

hellog Your new logger ! hellog is a general-purpose logging library. It offers a console.log-like API and formatting, extensible type-safety colored

Jan 5, 2022

The simplest field formatting and masking tool for React.

Format As You Type The simplest field formatting and masking tool for React. Format fields the way you want using the input components you already use

Jan 27, 2022

Obsidian plugin that adds autocomplete and auto-formatting to frontmatter tags.

Obsidian plugin that adds autocomplete and auto-formatting to frontmatter tags.

Obsidian Front Matter Tag Wizard Tired of having to type # to get tag autocompletion in your Obsidian note front matter? I feel your pain. This plugin

Nov 5, 2022

Visual Studio Code extension for formatting and linting Django/Jinja HTML templates using djLint

Visual Studio Code extension for formatting and linting Django/Jinja HTML templates using djLint

Dec 15, 2022

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

Jan 1, 2023

The Remix Stack for deploying to Fly with Supabase, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to Fly with Supabase, authentication, testing, linting, formatting, etc.

Remix Supa Fly Stack Learn more about Remix Stacks. npx create-remix --template rphlmr/supa-fly-stack What's in the stack Fly app deployment with Doc

Jan 7, 2023

The Remix Blog Stack for deploying to Fly with MDX, SQLite, testing, linting, formatting, etc.

The Remix Blog Stack for deploying to Fly with MDX, SQLite, testing, linting, formatting, etc.

Remix Speed Metal Stack Learn more about Remix Stacks. npx create-remix --template Girish21/speed-metal-stack Remix Blog 📖 This blog starter template

Jan 2, 2023

The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.

Remix Indie Stack Learn more about Remix Stacks. npx create-remix --template remix-run/indie-stack What's in the stack Fly app deployment with Docker

Dec 30, 2022

🌐 Text Input Component for validating and formatting international phone numbers.

🌐  Text Input Component for validating and formatting international phone numbers.

React Native Intl Phone Field Try the Expo Snack 👏 🕹️ Demo It's a javascript-only (no native code) component that can run in iOS, Android, Expo & Re

Jul 8, 2022

The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

Jan 2, 2023

The Remix Stack for deploying to Vercel with testing, linting, formatting, structure and mock for 3rd party API integration.

The Remix Stack for deploying to Vercel with testing, linting, formatting, structure and mock for 3rd party API integration.

Remix DnB Stack See it live: https://dnb-stack.vercel.app/ Learn more about Remix Stacks. npx create-remix --template robipop22/dnb-stack What's in th

Dec 13, 2022

🍺 Integrates Laravel Pint into your VSCode projects for automatic code formatting

Laravel Pint for VS Code This extension is NOT official from the Laravel team. Take a look into the official project. Integrates Laravel Pint into you

Dec 8, 2022

Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Synthwave Stack Learn more about Remix Stacks. npx create-remix --template ilangorajagopal/synthwave-stack What's in the stack Vercel deploymen

Dec 25, 2022

The Remix Stack for Web2 apps and Web3 DApps with authentication with Magic, testing, linting, formatting, etc.

The Remix Stack for Web2 apps and Web3 DApps with authentication with Magic, testing, linting, formatting, etc.

Remix French House Stack Learn more about Remix Stacks. npx create-remix --template janhesters/french-house-stack What's in the Stack? The French Hou

Dec 26, 2022
Comments
  • The code to shorten the traceback paths doesn't work for plugins

    The code to shorten the traceback paths doesn't work for plugins

    This is meant to display shorter traceback file paths: https://github.com/simonw/datasette-pretty-traces/blob/9b2dced9c63440070f4e8b85845bafd868113e1a/datasette_pretty_traces/static/datasette-pretty-traces.js#L35-L37

    It's too naive though. Here's what it does for plugins like datasette-search-all on https://latest-with-plugins.datasette.io/github/commits?_trace=1 :

    image bug 
    opened by simonw 5
  • Use var, let, const consistently

    Use var, let, const consistently

    I'm using all of them in https://github.com/simonw/datasette-pretty-traces/blob/0.2/datasette_pretty_traces/static/datasette-pretty-traces.js - because it started life as a hacked together prototype in this notebook: https://observablehq.com/@simonw/render-datasette-traces-prototype-with-longer-sql-display

    enhancement 
    opened by simonw 0
Releases(0.4)
Owner
Simon Willison
Simon Willison
React + Typescript + Jest + Lint + Prettier

React Boilerplate Objectives The main idea is to make it easy to start new projects using React. NPM Scripts yarn build build project using default we

Pedro Eduardo de Paula Naves 5 Mar 31, 2022
template with nextts, eslint&prettier, husky&lint-staged, tailwindcss&styled-components

Setup npm i Use VSCode, make sure the recommended eslint and prettier plugins are installed. Automatic linting should occur when you save! npx husky i

null 6 Mar 9, 2022
Long stack traces for node.js inspired by https://github.com/tlrobinson/long-stack-traces

longjohn Long stack traces for node.js with configurable call trace length Inspiration I wrote this while trying to add long-stack-traces to my server

Matt Insler 815 Dec 23, 2022
A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

null 10 Apr 6, 2022
Tiny JavaScript library (1kB) by CurrencyRate.today, providing simple way and advanced number, money and currency formatting and removes all formatting/cruft and returns the raw float value.

Zero dependency tiny JavaScript library (1kB bytes) by CurrencyRate.today, providing simple way and advanced number, money and currency formatting and removes all formatting/cruft and returns the raw float value.

Yurii De 11 Nov 8, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
He is like Batman, but for Node.js stack traces

Stackman Give Stackman an error and he will give an array of stack frames with extremely detailed information for each frame in the stack trace. With

Thomas Watson 242 Jan 1, 2023
Introduction to Metrics, Logs and Traces session companion code.

Introduction to Metrics, Logs and Traces in Grafana This is the companion repository to a series of presentations over the three pillars of observabil

Grafana Labs 35 Dec 24, 2022