A browser extension that will help you beautify the stacktrace of the annoying exceptions. Works with .NET & C#
Install extension »
Report bug
·
Request feature
The extension can be downloaded on the official link: https://chrome.google.com/webstore/detail/exception-beautifier/lnjihceobbbfgbnoghfeeofplkdelion
However, if you want to use the code provided in this repository you should follow the following steps in order to make it work in your Chrome browser:
- Download or clone the repository in your local machine
- Open Google Chrome
- Navigate to Google Chrome -> Settings
- From the Google Chrome Settings open -> Exensions
- Enable the developer mode in the top right corner
- Click on load unpacked
- Select the exceptionBeutifier folder
- Once the folder is uploaded you will be able to see the extension icon
exceptionBeautifier/
├── manifest.json
├── popup.html
├── popup.js
├── styles.css
├── demo
└── demo.gif
└── images/
├── icon16.png
├── icon48.png
├── icon128.png
└── logo.png
Paste one line unstructured stacktrace exception and get fully formatted output (see Demo section).
- Clear
Clears the input and output boxes.
- Copy to clipboard
The user can edit the settings and enable or disable the copy to clipboard setting. By default exceptionBeutifier has copy to clipboard set to enabled. This means that the exception will be copied once we paste it into the input box.
- Dark theme
Users can choose whether they like to use the bright or dark theme. By default exceptionBeutifier has copy to clipboard set to disabled. In order to enable dark mode the user should toggle the toggle to enabled state and save the changes.
Note: Changes won't apply if the user doesn't save before closing the settings.
Exception example:
// One line:
System.Exception: Test outer exception ---> System.Exception: Hello Exception at TestExceptionGenerator.Spike.GetException() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 29 at TestExceptionGenerator.Spike.GetInnerException() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 36 --- End of inner exception stack trace --- at TestExceptionGenerator.Spike.GetInnerException() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 41 at TestExceptionGenerator.Spike.<GenericExceptionWithInnerException>b__1() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 21 at TestExceptionGenerator.Extensions.GetExceptionString(Action action) in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 56
// Beautified:
System.Exception: Test outer exception
---> System.Exception: Hello Exception at TestExceptionGenerator.Spike.GetException() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 29
at TestExceptionGenerator.Spike.GetInnerException() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 36
--- End of inner exception stack trace ---
at TestExceptionGenerator.Spike.GetInnerException() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 41
at TestExceptionGenerator.Spike.<GenericExceptionWithInnerException>b__1() in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 21
at TestExceptionGenerator.Extensions.GetExceptionString(Action action) in c:\Code\personal\DotNetExceptionMessageFormatter\TestExceptionGenerator\Spike.cs:line 56
Have you found any bug? Or you maybe have an interesting feautre request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
Inspiration sources: