matlab-debugginglisted
Install: claude install-skill LiHongwei-cn/lihongwei-cn
# Investigating and Debugging MATLAB Code with MCP Tools
You have access to a live MATLAB session via MCP tools. Use them to actively
investigate code — whether debugging errors, understanding behavior, or answering
questions about how MATLAB code works. Don't just guess from code alone.
## When to Use
- User encounters a MATLAB error message or unexpected result
- User wants to set breakpoints or inspect variable state
- Tracing why a function produces wrong output
- NaN/Inf values appearing unexpectedly
- A MATLAB MCP tool returns an error or exception — including runtime errors, syntax errors, undefined function/variable errors, or failed test results
- User asks "why is my MATLAB code not working", "help me debug", or shares a MATLAB stack trace
## When NOT to Use
- Code quality review without a runtime problem — use `matlab-reviewing-code` instead
- Performance profiling — use performance optimization workflows
- Writing tests for correctness — use `matlab-testing` instead
- Understanding MATLAB APIs or language features without a specific bug
## Static Analysis vs Runtime Debugging
Not every issue needs the live MATLAB session. Choose the right approach:
- **Static analysis is enough** when: syntax errors, unused variables, obvious
logic mistakes, or issues visible from reading the source code alone. Use the
`Read` tool and `check_matlab_code`.
- **Runtime debugging is needed** when:
- The error depends on actual data values, types, or dimensions
- The o