| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
As an alternative to dbstep, you can select Debug > Step or Step In in most desktop tools, or click the Step or Step In buttons on the Editor toolbar.
dbstep
dbstep nlines
dbstep in
dbstep out
This function allows you to debug an M-file by following its execution from the current breakpoint. At a breakpoint, the dbstep function steps through execution of the current M-file one line at a time or at the rate specified by nlines.
dbstep executes the next executable line of the current M-file. dbstep steps over the current line, skipping any breakpoints set in functions called by that line.
dbstep nlines executes the specified number of executable lines.
dbstep in steps to the next executable line. If that line contains a call to another M-file function, execution will step to the first executable line of the called M-file function. If there is no call to an M-file on that line, dbstep in is the same as dbstep.
dbstep out runs the rest of the function and stops just after leaving the function.
For all forms, MATLAB software also stops execution at any breakpoint it encounters.
Note If you want to edit an M-file as a result of debugging, it is best to first quit debug mode and then edit and save changes to the M-file. If you edit an M-file while paused in debug mode, you can get unexpected results when you resume execution of the file and the results might not be reliable. |
dbclear, dbcont, dbdown, dbquit, dbstack, dbstatus, dbstop, dbtype, dbup
![]() | dbstatus | dbstop | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |