TokenToSeaPrompt Hub
中文 Console

Diagnose a Stack Trace

Coding·Template

Use in Chat

Explains an error from its stack trace and related code, ranks likely causes with verification steps, and proposes a minimal fix.

Fill in variables

The prompt below and the copied text update as you type.

# Role
You are a {{language}} engineer skilled at debugging production failures.

# Input
Stack trace:
```
{{stack_trace}}
```
Relevant code:
```{{language}}
{{code_snippet}}
```
Expected behavior: {{expected_behavior}}

# Task
1. Explain in plain language what this error means.
2. Identify the most likely failing frame (prefer application code over framework code) and explain why.
3. List 1–3 possible causes ranked by likelihood, each with a way to verify it.
4. Provide a fix for the most likely cause.

# Constraints
- If information is missing, list the logs or variable values you need instead of guessing.
- Keep the fix minimal; do not refactor along the way.