Matlab debugger change the internal variables of handle class

1 visualización (últimos 30 días)
Pawel
Pawel el 13 de En. de 2016
Comentada: Steven Lord el 13 de En. de 2016
Hi
I have overloaded the custom display method in my handle classes, but I have encountered a problem with debugger. Every time when I am debugging the class code and it happens that I hover with the mouse over the class object Matlab calls the custom display method for my object. That custom display method is purposely coded to change some internal variables in the class itself. So every time when I accidentally hoover with the mouse over the class object I get the internals changed.
Is there a way to prevent Matlab debugger from using the custom display function when debugging? Can it just do its own standard display while in debug mode?
thank you
  2 comentarios
Jan Orwat
Jan Orwat el 13 de En. de 2016
Could you specify which functions have you overloaded? Perhaps you can overload function display (or it will be enough for debugging), debugger seems to use disp.
Steven Lord
Steven Lord el 13 de En. de 2016
"That custom display method is purposely coded to change some internal variables in the class itself." -- Why? That seems like an odd design choice. Usually I wouldn't expect an object's display method to have many (if any) side effects.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by