https://github.com/xiaomi7732/stackbeauty
Format stack, make it easy to read and understand
https://github.com/xiaomi7732/stackbeauty
callstack debugging diagnostic-tool formatter
Last synced: about 2 months ago
JSON representation
Format stack, make it easy to read and understand
- Host: GitHub
- URL: https://github.com/xiaomi7732/stackbeauty
- Owner: xiaomi7732
- License: mit
- Created: 2022-02-18T02:04:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-12T18:41:39.000Z (about 1 year ago)
- Last Synced: 2025-04-24T03:44:19.642Z (8 months ago)
- Topics: callstack, debugging, diagnostic-tool, formatter
- Language: C#
- Homepage: https://stack.codewithsaar.net
- Size: 484 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Stack Beauty
.NET Call Stack is a chuck of text that is not easy to read.
And we shall try to make a change there.
## Vision
This is a service, taking in a chuck of text, understand the semantic of it and beautify it!
## Live site
[Stack Beauty @ stack.codewithsaar.net 🔗](https://stack.codewithsaar.net/)
## Approach
Stacks are similar. We build parsers to understand the text, and unify them into the same syntax:

There will be the engine, some parsers for .NET to bootstrap the effort. Looking forward to have more contributions on parsers for other languages. If you have any idea/suggestion, [file an issue](https://github.com/xiaomi7732/StackBeauty/issues).
## Challenge
There are various formats for call stack the user could get. And that shouldn't matter to the user. As long as it is a stack, this service shall be able to recognize it, beautify it and return the result to the user.
## Architecture
```mermaid
graph LR
A[Input] --> |Pre-Filter| G(IFrame created & tagged)
G -->|Parsers| B(IFrameLine collection)
B -->|Beautifiers| C{Beautified IFrameLine collection}
C -->|Html Render| D[Html]
C -->|Text Render| E[Text]
C -->|... Render| F[...]
```
Generally, once input, callstack will be parsed by parsers; then beautifiers steps in to beautify various parts and output it as json; renders will pick up the json and output it to various results - html; svg; ...
```mermaid
graph TD
A[Stack Blob] -->|Match| B{Find out beautifier}
B --> |exception| C[Exception trace beautify]
B --> |ETW trace| D[ETW trace beautify]
B --> |...| E[...]
B --> |Stream| F[Stream trace beautify]
F
C --> Z[output AsyncEnumerable of FrameItem]
D --> Z
E --> Z
F --> Z
```