![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/326531/image.png)
How to set "dbstop if error" only to stop in my code
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I use:
dbstop if error
often, to debug on any kind of error in my code.
The problem is that, when an error, it jumps to a breakpoint not only in my files, but in internal matlab functions.
And it is annoying trying to get out of those functions to reach my line where I did the error.
0 commentaires
Réponse acceptée
the cyclist
le 3 Juil 2020
I don't think that that is possible.
Are you aware of the "function stack" capability in the user interface? I show a screenshot below. This is an extremely quick way of getting out of the MATLAB built-ins and into your own function.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/326531/image.png)
That pull-down menu lists the stack of functions to reach the breakpoint. I would definitely not describe it as "annoying trying to get out of those functions", so thought maybe you are unaware.
I hope that helps.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Function Creation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!