Desktop Tools and Development Environment |
|
Preparing for Debugging
Do the following to prepare for debugging:
- Open the file--To use the Editor/Debugger for debugging, open it with the file to run.
- Save changes--If you are editing the file, save the changes before you begin debugging. If you try to run a file with unsaved changes from within the Editor/Debugger, the file is automatically saved before it runs. If you run a file with unsaved changes from the Command Window, MATLAB runs the saved version of the file, so you will not see the results of your changes.
- Add the files to a directory on the search path or put them in the current directory--Be sure the file you run and any files it calls are in directories that are on the search path. If all files to be used are in the same directory, you can instead make that directory be the current directory.
Example--Preparing for Debugging
Open the file collatzplot.m
. Make sure the current directory is the directory in which you saved collatzplot
.
| Debugging Process and Features | | Setting Breakpoints | |
© 1994-2005 The MathWorks, Inc.