How can i debug a user defined function, when called in main program? i'm not able stop the execution when in the function to verify the data/work space?
Mostra commenti meno recenti
Actually, i have written a function for a specific task. This function i'm calling in a main program as and when required. Now, when i execute it, there is an error message pertaining to this function. Now i'm not able to break(with a break point) the execution when in the function. How can i debug in such situations? Please any one know the solution for this, Let me know. Thank you Ravi
Risposte (1)
Sean de Wolski
il 4 Nov 2013
Do you have a clear all in your script that's clearing out the breakpoints? If so, remove the "all" from clear all.
Personally, I highly recommend using:
dbstop if error
Then run your code and when the error occurs it will stop and let you inspect what's going on.
Categorie
Scopri di più su Debugging and Improving Code in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!