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

11 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de En. de 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 comentario
Adam Danz
Adam Danz el 23 de Abr. de 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)'}.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Debugging and Analysis en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2008a

Community Treasure Hunt

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

Start Hunting!

Translated by