StackTraceBeautify 2.0.0
dotnet add package StackTraceBeautify --version 2.0.0
NuGet\Install-Package StackTraceBeautify -Version 2.0.0
<PackageReference Include="StackTraceBeautify" Version="2.0.0" />
<PackageVersion Include="StackTraceBeautify" Version="2.0.0" />
<PackageReference Include="StackTraceBeautify" />
paket add StackTraceBeautify --version 2.0.0
#r "nuget: StackTraceBeautify, 2.0.0"
#:package StackTraceBeautify@2.0.0
#addin nuget:?package=StackTraceBeautify&version=2.0.0
#tool nuget:?package=StackTraceBeautify&version=2.0.0
StackTraceBeautify
.NET Port of netStack.js
A simple Library for highlighting .NET, Java, JavaScript, Python, PHP, Ruby and Go stack traces. It converts a Stack Trace (String) in to an html highlighted (beautified) String
Stacktrace - Runtime support
- .NET -
at Type.Method(String s) in file.cs:line 12 - Java (and other JVM languages like Kotlin or Scala) -
at com.example.Type.method(Type.java:12) - JavaScript - V8 (Chrome, Edge, Node.js):
at Type.method (file.js:12:5), Firefox and Safari:method@file.js:12:5 - Python -
File "file.py", line 12, in function - PHP -
#0 file.php(12): Type->method('abc') - Ruby -
from file.rb:12:in 'Type#method' - Go -
main.(*Type).Method(0x1)followed by/path/file.go:12 +0x1d
The runtime is detected from the first recognized stack frame, GetRuntime() returns the detected runtime.
To skip the detection, set the runtime in the options (Runtime = StackTraceRuntime.Java).
Stacktrace - Language support
The .NET parser does not depend on the language of the stack trace. Frames are recognized by their structure
(<at> Type.Method(params) [<in> file:<line> number]), so stack traces in any language are supported,
e.g. Danish, English, French, Japanese, German, Spanish, Russian, Chinese, ...
GetLanguage() returns the detected language (for information only) for all .NET Framework translations:
English, Arabic, Chinese (Simplified and Traditional), Czech, Danish, Dutch, Finnish, French, German, Greek, Hebrew,
Hungarian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Swedish and Turkish
(Norwegian uses the same keywords as Danish and is detected as Danish).
Demo
Stack Trace Formatter - Online pretty print of .NET stack traces
Initialization
var bs = new StackTraceBeautify()
bs.Beautify(input);
Options
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",
ColumnCssClass = "st-column",
Runtime = StackTraceRuntime.Auto
});
Ready to go 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;}
.st-column {color:#ff4f68;}
Acknowledgments
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| .NET Framework | net481 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8.1
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.