debugging

Diagnose Rails 8 issues via log analysis, console debugging, and breakpoints.

Updated Dec 13, 2024
One-click install
npx skills add https://github.com/apdarr/lace --skill debugging-apdarr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging
Source: https://github.com/apdarr/lace/tree/main/.github/skills/debugging
Command: npx skills add https://github.com/apdarr/lace --skill debugging-apdarr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers diagnose and fix Rails issues efficiently by guiding structured log analysis, console debugging, and breakpoint workflows.

Core Features & Use Cases

  • Structured log investigation: tails logs, filters by severity, and pinpoints failures across development, test, and production.
  • Interactive debugging guidance: outlines how to use the debug gem for breakpoints, step-through debugging, and inspector commands.
  • Console and runner assistance: demonstrates Rails console usage, Rails runner, and common model/route debugging patterns.
  • Repro and verification routines: provides steps to reproduce failures, verify fixes, and track regressions across environments.

Quick Start

Diagnose Rails issues by inspecting logs, reproducing errors in the console, and using the debug gem to set breakpoints.

Frequently Asked Questions about debugging

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

FAQPage Schema
How do I debug a failing Rails test using breakpoints?

To debug failing Rails tests, use the debug gem to insert breakpoints directly into your test suite. This pauses execution so you can inspect variables and step through code to isolate the failure.

What's the best way to analyze Rails logs to find application errors?

The best way to analyze Rails logs for errors is to filter by severity level and tail the logs. This structured log investigation pinpoints failures across development, test, and production environments.

Can I use the Rails console to reproduce unexpected application behavior?

Yes, you can use the Rails console to reproduce unexpected behavior. It allows you to execute model and route debugging commands directly to verify issues and test fixes interactively.

Does this debugging guidance work with Rails 8 and SQLite?

Yes, this debugging guidance is applicable to Rails 8 applications using SQLite. It covers tooling usage for the debug gem, including setting breakpoints and inspecting SQL logging.

How do I troubleshoot background job issues in Rails?

Troubleshoot Rails background job issues by using structured log investigation and the debug gem. Set breakpoints within job classes to inspect execution context and identify processing failures.

Why are my Rails SQL queries returning unexpected results?

Rails SQL queries returning unexpected results can be diagnosed using SQL logging and the Rails console. Inspect the generated queries and test model scopes directly to find the logic error.