Matlab debugger change the internal variables of handle class

조회 수: 5 (최근 30일)
Pawel
Pawel 2016년 1월 13일
댓글: Steven Lord 2016년 1월 13일
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
Jan Orwat
Jan Orwat 2016년 1월 13일
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 2016년 1월 13일
"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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by