matlab-debugging

Diagnose MATLAB runtime failures using live MCP-backed tools.

883|109|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-debugging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-debugging
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/matlab-core/matlab-debugging
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-debugging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you diagnose MATLAB errors and unexpected behavior by using a live MATLAB session to confirm what actually happens at runtime, not just what code appears to do.

Core Features & Use Cases

  • Runtime error investigation: Understand root causes behind common failure patterns such as undefined functions, indexing issues, dimension mismatches, and exceptions from tests or tool invocations.
  • Workspace and call stack inspection: Inspect variables and navigate the call stack to trace how inputs transform into the failing state.
  • Static vs runtime triage: Use static analysis first when appropriate, then escalate to runtime debugging when the bug depends on data values, types, or dimensions.
  • Desktop-mode-aware debugging: Avoid hanging MCP evaluations by selecting try-catch and non-pausing strategies when MATLAB has no desktop.

Use Case: When an AI agent runs a MATLAB function and reports an exception or wrong output, you can use this Skill to inspect the failing inputs, identify the precise location in user code, and propose a verified fix.

Quick Start

Ask your AI to diagnose the MATLAB error by inspecting the call stack and relevant variables for the failing run.

Frequently Asked Questions about matlab-debugging

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

FAQPage Schema
How do I debug MATLAB runtime errors by inspecting the call stack and workspace?

Debug MATLAB runtime errors by using live MCP-backed tools to inspect the call stack and workspace variables, tracing how inputs transform into the failing state to identify the precise root cause.

How do I diagnose NaN and Inf propagation issues in MATLAB functions?

Diagnose NaN and Inf propagation in MATLAB by escalating from static analysis to runtime investigation, inspecting live variable values to isolate data-dependent issues causing unexpected outputs.

What is the best way to debug MATLAB test failures during automated runs?

Debug MATLAB test failures by reproducing exceptions in a live session, evaluating the failing test inputs, and navigating the call stack to verify the root cause before proposing a fix.

How do I avoid MATLAB hanging when debugging in no-desktop mode?

Avoid MATLAB hanging in no-desktop mode by selecting safe desktop-aware debugging strategies, utilizing try-catch blocks and post-run inspection to prevent pausing during MCP evaluations.

When should I use static analysis versus runtime debugging for MATLAB code?

Use static analysis for initial triage of MATLAB code, then escalate to runtime debugging when the bug depends on specific data values, types, or dimensions that require live inspection to resolve.

Can I diagnose dimension mismatch and indexing errors in MATLAB using live inspection?

Diagnose dimension mismatch and indexing errors in MATLAB by leveraging evaluate and check tools at runtime to reproduce the failure, inspect the exact variables, and verify the data-dependent root cause.