https://github.com/w8tcha/stacktracebeautify
A simple Library for highlighting .NET stack traces. It converts a Stack Trace (String) in to an html highlighted (beautified) String
https://github.com/w8tcha/stacktracebeautify
exception exception-handling exceptions highlighting stacktrace
Last synced: 9 months ago
JSON representation
A simple Library for highlighting .NET stack traces. It converts a Stack Trace (String) in to an html highlighted (beautified) String
- Host: GitHub
- URL: https://github.com/w8tcha/stacktracebeautify
- Owner: w8tcha
- License: apache-2.0
- Created: 2022-04-15T04:01:45.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-07-26T04:02:37.000Z (11 months ago)
- Last Synced: 2025-08-26T17:19:14.521Z (10 months ago)
- Topics: exception, exception-handling, exceptions, highlighting, stacktrace
- Language: C#
- Homepage:
- Size: 125 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# StackTraceBeautify
.NET Port of [netStack.js](https://github.com/elmahio/netStack.js)
[](https://nuget.org/packages/StackTraceBeautify) [](#)

A simple Library for highlighting .NET stack traces. It converts a Stack Trace (String) in to an html highlighted (beautified) String
#### Stacktrace - Language support
* English
* Denmark
* German
* Russia
* Chinese
#### Demo
[Stack Trace Formatter - Online pretty print of .NET stack traces](https://elmah.io/tools/stack-trace-formatter/)
#### Initialization
```c#
var bs = new StackTraceBeautify()
bs.Beautify(input);
```
#### Options
```c#
var bs = new StackTraceBeautify(new Options
{
PrettyPrint = false,
FrameCssClass = "st-frame",
TypeCssClass = "st-type",
MethodCssClass = "st-method",
ParamsListCssClass = "st-frame-params",
ParamTypeCssClass = "st-param-type",
ParamNameCssClass = "st-param-name",
FileCssClass = "st-file",
LineCssClass = "st-line"
});
```
#### Ready to go css
```css
pre, code {background-color:#333; color: #ffffff;}
.st-type {color: #0a8472; font-weight: bolder;}
.st-method {color: #70c9ba; font-weight: bolder;}
.st-frame-params {color: #ffffff; font-weight: normal;}
.st-param-type {color: #0a8472;}
.st-param-name {color: #ffffff;}
.st-file {color:#f8b068;}
.st-line {color:#ff4f68;}
```
---
### Acknowledgments
* [@elmahio](https://github.com/elmahio)
* [@IgoR-NiK](https://github.com/IgoR-NiK)