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?
古いコメントを表示
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
回答 (1 件)
Sean de Wolski
2013 年 11 月 4 日
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.
カテゴリ
ヘルプ センター および File Exchange で Debugging and Improving Code についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!