Stack Trace Formatter & Analyzer

Paste an exception copied from a log, a CI run or a chat message and see it re-indented, with library frames folded away and the root cause named. Traces often include file paths and data, so they are parsed locally.

Input

Settings

History

Load from URL

What the formatter understands

The page uses built-in stack trace parsers that recognise four families of traces, even when they are surrounded by other log output:

  • Java (and Kotlin, Scala or Groovy on the JVM): at com.example.Foo.bar(Foo.java:42), Caused by: chains, Suppressed: blocks and ... 6 more markers.
  • Python: Traceback (most recent call last): blocks with File "app.py", line 3, in main frames and their source lines, including chained exceptions joined by “During handling of the above exception” or “The above exception was the direct cause”.
  • .NET: at Namespace.Type.Method() in /src/File.cs:line 57 frames and ---> inner exceptions.
  • JavaScript (Node.js and browsers): at fn (app.js:10:5) frames and [cause] chains.

Each trace is printed again with one consistent indentation per level, so the exception headline, its frames and every nested cause are easy to tell apart.

Collapse framework frames

The one option, Collapse framework frames, is on by default. It replaces each run of library and runtime frames with a single line such as … 4 framework frames hidden, leaving the frames from your own code in view. What counts as framework code depends on the language:

  • Java: java.*, jdk.*, sun.*, org.springframework.*, org.apache.*, io.netty.*, Hibernate, JUnit, Kotlin and Scala runtime packages and similar
  • .NET: anything in the System. or Microsoft. namespaces
  • Python: files under site-packages, dist-packages or the standard library
  • JavaScript: node: internals and anything inside node_modules

Turn the option off when the bug may be in a dependency, or when you need the complete trace to file an upstream issue.

Above the output, a summary lists the detected language, the outermost exception and message, the root cause (the innermost Caused by for Java, the first exception in a Python chain, the innermost exception for .NET), and how many frames were framework frames. The Table view lists every frame with function, file, line, column and a framework flag, ready to sort or export.

Ctrl/Cmd+Enter re-runs the analysis, Ctrl/Cmd+Shift+C copies the cleaned trace and Ctrl/Cmd+K opens the palette. There is nothing to minify, so Ctrl/Cmd+Shift+M does not apply.

Tips

Paste generously: lines before and after the trace are kept as they are, and several traces in one paste are each analysed. When a stack trace is buried in JSON log output, open it in the log parser first or unescape the string, since \n sequences hide the frame structure.

Line numbers in a trace refer to the build that crashed. If the code has changed since, the numbers will be off by a few lines; check out the matching commit before chasing them.

Examples

Python chained exceptions

The summary names RuntimeError as the exception and the TypeError as its root cause; the Django frame is marked as framework.

Input
Traceback (most recent call last):
  File "/app/shop/orders.py", line 42, in total
    return sum(i.qty * i.price for i in order.items)
TypeError: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/shop/views.py", line 18, in show
    total = orders.total(order)
  File "/usr/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
RuntimeError: could not compute total
Output
Traceback (most recent call last):
    File "/app/shop/orders.py", line 42, in total
        return sum(i.qty * i.price for i in order.items)
TypeError: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
    File "/app/shop/views.py", line 18, in show
        total = orders.total(order)
    File "/usr/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
        response = wrapped_callback(request, *callback_args, **callback_kwargs)
RuntimeError: could not compute total
Open this example in the tool

.NET exception with framework frames

The two System.Linq frames collapse into one line, leaving the application frames with their file and line.

Input
System.InvalidOperationException: Sequence contains no elements
   at System.Linq.ThrowHelper.ThrowNoElementsException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Shop.Orders.OrderService.Latest(String customerId) in /src/Shop/Orders/OrderService.cs:line 57
   at Shop.Api.OrdersController.Get(String id) in /src/Shop.Api/OrdersController.cs:line 23
Output
System.InvalidOperationException: Sequence contains no elements
    … 2 framework frames hidden
    at Shop.Orders.OrderService.Latest(String customerId) in /src/Shop/Orders/OrderService.cs:line 57
    at Shop.Api.OrdersController.Get(String id) in /src/Shop.Api/OrdersController.cs:line 23
Open this example in the tool

Node.js trace with every frame shown

With collapsing switched off, the Express and Node internal frames stay visible but are still flagged as framework in the table.

Input
TypeError: Cannot read properties of undefined (reading 'price')
    at total (/app/src/orders.js:12:31)
    at Array.reduce (<anonymous>)
    at OrderService.sum (/app/src/orders.js:11:24)
    at Layer.handle (/app/node_modules/express/lib/router/layer.js:95:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Output
TypeError: Cannot read properties of undefined (reading 'price')
    at total (/app/src/orders.js:12:31)
    at Array.reduce (<anonymous>)
    at OrderService.sum (/app/src/orders.js:11:24)
    at Layer.handle (/app/node_modules/express/lib/router/layer.js:95:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Open this example in the tool

Common errors and how to fix them

ErrorCauseFix
No stack trace foundThe text contains no line that looks like a frame in any supported language, for example only the exception message was copied.Copy the whole trace including the indented “at …” or “File …” lines. The hint under the error shows the expected frame shapes.
The whole trace is on one lineThe trace was copied from a JSON log field, where line breaks are stored as \n escape sequences.Unescape the string first (the JSON formatter shows the decoded value), then paste the result here.
My own frames are hiddenYour package name starts with a prefix treated as framework code, such as org.apache, or your Python code lives under site-packages.Switch off Collapse framework frames to see everything.

Frequently asked questions

Which languages are supported?

Java and other JVM languages, Python, .NET (C#, F#, VB) and JavaScript from Node.js or browsers.

What is the root cause shown in the summary?

The deepest exception in the chain: the last Caused by in Java, the innermost exception in .NET, and the first exception of a Python chain.

Can I paste several traces at once?

Yes. Each trace is detected separately and the summary numbers them.

Does it deobfuscate or symbolicate traces?

No. ProGuard or R8 mappings and source maps are not applied, so minified names stay as they are.

Related tools