dart-fix-runtime-errors

Trace Dart runtime stack traces to failing lines and apply fixes.

428|29|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/dart-lang/skills --skill dart-fix-runtime-errors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-fix-runtime-errors
Source: https://github.com/dart-lang/skills/tree/main/skills/dart-fix-runtime-errors
Command: npx skills add https://github.com/dart-lang/skills --skill dart-fix-runtime-errors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Dart developers quickly identify and fix runtime errors by tracing an active stack trace to the failing line, applying a targeted fix, and validating the outcome.

Core Features & Use Cases

  • Trace-and-fix workflow: Use get_runtime_errors to capture the runtime stack trace and locate the precise failure location.
  • LSP-guided localization: Leverage language-server protocol cues to pinpoint the failing expression or call.
  • Verification via hot_reload: Apply changes and confirm resolution by performing a hot reload to ensure stability in development.
  • Use Case: When a Dart or Flutter app throws a runtime error during development or hot reload, this skill guides you from error capture to a verified fix.

Quick Start

Fetch the active stack trace with get_runtime_errors, locate the failing line using LSP, apply a minimal fix, and verify the result with a hot_reload.

Frequently Asked Questions about dart-fix-runtime-errors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Dart runtime errors using a stack trace?

To fix Dart runtime errors using a stack trace, the workflow captures the active runtime stack trace, pinpoints the failing line via language-server protocol cues, applies a targeted patch, and validates the fix using hot reload.

What is the best way to resolve Flutter runtime errors during a hot reload cycle?

The best way to resolve Flutter runtime errors during a hot reload cycle is to fetch the active stack trace, use LSP to locate the failing expression, apply a minimal fix, and verify the result by triggering another hot reload.

How does LSP help locate failing code in Dart applications?

LSP helps locate failing code in Dart applications by providing language-server protocol cues that pinpoint the exact failing expression or call identified within the captured runtime stack trace.

Can I use this trace-and-fix workflow for both Dart and Flutter projects?

Yes, you can use this trace-and-fix workflow for both Dart and Flutter projects experiencing runtime faults during development or hot reload cycles to trace errors and apply validated patches.

Why do I need to hot reload after patching a Dart runtime error?

You need to hot reload after patching a Dart runtime error to apply changes immediately and confirm resolution, ensuring stability throughout the rest of your development cycle.

What should I do if my Dart runtime error is not working after a patch?

If your Dart runtime error is not working after a patch, recapture the active stack trace with get_runtime_errors, re-evaluate the LSP localization for the failing line, and validate the new fix with another hot reload.