How do you set a breakpoint on multiple lines at once?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a long code, and the error handling options are not respected most likely because the code I am using is part of a software package. Breakpoints are respected but the code is around 700 lines long and I don't want to have to set a breakpoint manually for each line everytime I restart matlab.
Yes I know its not efficient, but the code is a black box, I have no control over the inner workings, and this is the only way I can debug the process.
0 commentaires
Réponses (1)
Steven Lord
le 15 Mar 2021
Breakpoints are respected but the code is around 700 lines long and I don't want to have to set a breakpoint manually for each line everytime I restart matlab.
Why do you need to set a breakpoint manually for each line? I would set a breakpoint on the first line then step through the code from there.
If you need to restore the breakpoints, call dbstatus to create a struct array with information about the location of the breakpoints and pass that struct array into dbstop to restore those breakpoints.
If somewhere in the "black box" code you're running or in your code, if you're calling clear all then that would clear the debugging state. Try removing that and see if the error breakpoints functionality does what you need.
0 commentaires
Voir également
Catégories
En savoir plus sur Debugging and Analysis 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!