Debugging and Analysis - MATLAB & Simulink (original) (raw)
Main Content
Diagnose problems, check syntax and release compatibility
As you work in the Editor and Live Editor, MATLABĀ® automatically identifies potential coding problems. Debugging features help you diagnose specific issues. Additionally, you can generate reports that help you update your code when you upgrade to a newer MATLAB release.
Tools
Functions
dbclear | Remove breakpoints |
---|---|
dbcont | Resume execution |
dbdown | Reverse dbup workspace shift |
dbquit | Quit debug mode |
dbstack | Function call stack |
dbstatus | List all breakpoints |
dbstep | Execute next executable line from current breakpoint |
dbstop | Set breakpoints for debugging |
dbtype | Display file with line numbers |
dbup | Shift current workspace to workspace of caller in debug mode |
keyboard | Give control to keyboard |
echo | Display statements during function or script execution |
codeIssues | Identify code issues in files (Since R2022b) |
---|---|
fix | Fix code issues (Since R2023a) |
export | Write code issues to file (Since R2023b) |
checkcode | Check MATLAB code files for possible problems |
Topics
Debugging
- Debug MATLAB Code Files
Diagnose problems in MATLAB code files using different debugging methods. (Since R2021b) - Editor/Debugger Settings
Use Editor/Debugger settings to customize the Editor.
Syntax Checking
- Check Syntax and Autocomplete Code as You Type
Use syntax highlighting, delimiter matching, and code suggestions to write commands faster and avoid syntax errors. - Check Code for Errors and Warnings Using the Code Analyzer
Use the MATLAB Code Analyzer to check your code for coding problems automatically. - MATLAB Code Analyzer Report
Generate a report that identifies potential errors, problems, and opportunities for improvement in your code. - Code Analyzer Settings
Modify Code Analyzer settings to enable or disable Code Analyzer features and specify message indicator settings. - Configure Code Analyzer
Configure Code Analyzer messages and add custom checks. - Index of Code Analyzer Checks
This topic contains a listing of built-in MATLAB Code Analyzer checks which you can modify to meet your own custom coding standards.
Release Compatibility
- MATLAB Code Compatibility Analyzer
Generate a report to identify potential compatibility issues in your code when you upgrade to a newer MATLAB release.
Code Generation
- Code Generation Readiness Tool
The code generation readiness tool screens MATLAB code for features and functions that code generation does not support.