How can I disable all the breakpoints that have been set in a MATLAB code file in MATLAB 7.6(R2008a) ?

11 vues (au cours des 30 derniers jours)
I want to disable all the breakpoints in a MATLAB code file, from the command prompt. I do not want to right click on each break point and select the "Disable Breakpoint" option.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 27 Jan 2010
To disable all the break points in a MATLAB code file, you need to set the expression property of the breakpoints on all lines to 'false'. The following code disables all the breakpoints in the same file.
s = dbstatus
s.expression(:) = {'false'}
dbstop(s)
The structure 's' contains the line numbers of all the breakpoints, with the corresponding expression values of these break points.
  1 commentaire
Adam Danz
Adam Danz le 23 Avr 2025
Note that this will disable conditional break points but it will also conver them to a simple break point that, when re-enabled, will no longer be conditional.
To disable a conditional break point without eliminating the condition, replace the expression with "false&&(__)" where the "__" contains the original condition.
For example, let's say the conditional breakpoint is "n>0.5". s.Expressions will be {'n>0.5'}. To disable that without eliminating the condition, replace it with {'false&&(n>0.5)'}.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Debugging and Analysis dans Help Center et File Exchange

Produits


Version

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by