Using Exceptionite 2 in Django with a single line
Tags: python, django, debugging, masonite
Published: 2022-04-15 04:44:24


 ---
title: Using Exceptionite 2 in Django with a single line
published: true
description: Install Exceptionite 2 in your Django application with a single line.
tags: python, Django, debugging, masonite
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2hyoymju1f8g5h4tv6eo.jpeg
---

## Introduction

Exceptionite 2 is a debugging screen package written by the [Masonite](https://github.com/masoniteframework/masonite) team. Although written by the Masonite maintainer team, it can be used in Flask, Django and of course Masonite.

Starting in Masonite 4.9 this is the default debugging screen and it comes with a lot of amazing features.

* Detailed solutions for common or framework specific issues 
* Easy to ready stack traces to see exactly which frames were hit
* Easily click any line in the stack trace to open that line in your editor
* Detailed environment and framework specific information
* Easily copy detailed information to quickly paste and share with your team or community.

## Notable Features

Before we go into how to quickly install Exceptionite into your Django project I'd like to go over some notable features in a bit more detail.

### Sharing detailed errors

Sometimes when you hit an exception and you can't figure it out you tend to go to people that can figure it out. Maybe these people are you coworkers or maybe they are a group inside a Discord server.

In the top right you can click the Share Error link:

![Share Error Link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a0x4mok1cyfyx73k5a8l.png)

This will open a popup where you can easily select the important information you want to be put on your clipboard so you can paste the info later:

![Share Error Popup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/amyuylkf69ptnisb5v8w.png)
 
 You can copy this information either as "Raw" (just bullet points and text) or as markdown.

### Solutions

Another awesome part of Exceptionite is the ability to see solutions to your exception in the first place. This is like having someone over your shoulder giving you suggestions while you develop your application.

![Solutions To Errors](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ss7epyt5j0fipz1gpo0.jpeg)
 
### Clicking on a stack trace line

One of the amazing features is to click on a stack trace line and be able to open that line up directly in your editor to quickly start fixing

![Stack Trace Line](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2fb99uraxgfr87uivbh.png)

![Open in Editor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e5eoro42p994bp7sdcbf.png)
 
## Dark Mode

Thought this package couldn't get cool enough? It comes with a dark mode:

![Dark Mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvbfk1hm7fcbww7sy4k7.png)
 

## Installing it in your Django project

Having Exceptionite 2 serve your debug exception screen is extremely simple.

1. Install Exceptionite:

```
pip install exceptionite
```

2. Set the Django exception report as the `DEFAULT_EXCEPTION_REPORTER` in the `settings.py` file.

```python
# mysite/settings.py

DEFAULT_EXCEPTION_REPORTER = "exceptionite.django.ExceptioniteReporter"
```