Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/everhide/everbug

Django debug tool for browser
https://github.com/everhide/everbug

debug django django-rest-framework middleware

Last synced: about 12 hours ago
JSON representation

Django debug tool for browser

Awesome Lists containing this project

README

        

# Everbug - Debugger for Django projects

![](https://img.shields.io/badge/build-passing-brightgreen.svg) ![](https://img.shields.io/badge/coverage-98%25-green.svg)

The Everbug is a lightweight Django middleware for Chrome/Firefox extension with easy install.
One of the advantages: the response body of target page remains clean and unchanged.

Special summary:
* Database queries with explains (Multiple database support)
* Context variables
* Profiles functions (cProfile through decorator)
* Support ajax requests

### Demo
![Demo](.preview.gif)

## Installing

For Django:
```
Run "pip install everbug".
Add "everbug" to your INSTALLED_APPS in settings.py.
Append "everbug.middleware.Tracer" to MIDDLEWARE or MIDDLEWARE_CLASSES in settings.py.
```

For browser:
* [Chrome extension](https://chrome.google.com/webstore/search/everbug)
* [Firefox extension](https://addons.mozilla.org/ru/firefox/addon/everbug/)

## Usage
Context variables displayed as-is, except admin views, DRF views and all views without a context_data. Queries works for all databases and requests (include ajax) in "DATABASES" section. Profile works for all methods through decorator (based on builtin cProfile). By default, profile output is truncated to 20 lines.

Example usage:
```python
from everbug.shortcuts import profile

@profile
def sample_method():
# some code here ...
```
Call @profile with argument for full view, for example:
```python
@profile(short=False)
def sample_method():
# some code here ...
```

## Running the tests
```shell
docker-compose up -d
docker exec -it everbug tox
```

## Requirements
Python >= 3.5
Django >= 1.11

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details