Main Content

Debugging and Analysis

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.


Code AnalyzerIdentify and address code issues (Since R2022b)
Code Compatibility AnalyzerIdentify and address compatibility issues against current version of MATLAB (Since R2022a)


expand all

dbclearRemove breakpoints
dbcontResume execution
dbdownReverse dbup workspace shift
dbquitQuit debug mode
dbstackFunction call stack
dbstatusList all breakpoints
dbstepExecute next executable line from current breakpoint
dbstopSet breakpoints for debugging
dbtypeDisplay file with line numbers
dbupShift current workspace to workspace of caller in debug mode
keyboardGive control to keyboard
echoDisplay statements during function or script execution
codeIssuesIdentify code issues in files (Since R2022b)
fixFix code issues (Since R2023a)
exportWrite code issues to file (Since R2023b)
checkcodeCheck MATLAB code files for possible problems
mlintrptRun checkcode for file or folder
codeCompatibilityReportCreate code compatibility report
analyzeCodeCompatibilityCreate code compatibility analysis results
matlab.codeanalysis.validateConfigurationValidate Code Analyzer configuration file (Since R2023a)
matlab.codeanalysis.refreshConfigurationRefresh cached Code Analyzer configuration (Since R2023a)



Syntax Checking

Release Compatibility

Code Generation

  • Code Generation Readiness Tool
    The code generation readiness tool screens MATLAB code for features and functions that code generation does not support.