필터 지우기
필터 지우기

Hovering in debug mode triggers a jump into get.property() methods

조회 수: 7 (최근 30일)
Matt J
Matt J 2024년 3월 25일
편집: Matt J 2024년 5월 6일
I have been experiencing an aggravating thing for the past several Matlab releases and for which I am looking for troubleshooting advice. Unfortunately, I haven't been able to identify a minimal example to reproduce it.
Sometimes, though, when I am stopped in debug mode within the workspace of some class method, if I hover the mouse over an object (of that class or perhaps also other classes), I am immediately catapulted to a breakpoint in the workspace of one of its set.property() methods. This new breakpoint was not set by me and no error messages are shown in the command window to indicate that it was raised by an error
As an example, the screenshot below shows an instance where I have stopped in a method called vmi() of class SegmentedLabelMap, whose parent class is MatDecomp.
When I then hover the mouse over "obj" as yellow-highlighted in the screenshot, the debugger transports me (see 2nd screenshot below) to a different location in the workspace of MatDecomp.get.meta(), which contains the definition of one of obj's property get() methods. Moreover, a string of "datatipinfo" function calls now appears in the call stack, as yellow-highlighted in the 2nd screenshot.
I assume this occurs because the get.property() needs to be called to gather data for the datatip display. However, I wonder why it creates another breakpoint in get.meta() rather than just executing this to completion? In any case, I don't like this behavior. Is there an Editor preference setting to turn it off?
  댓글 수: 2
Mario Malic
Mario Malic 2024년 3월 26일
I remember experiencing this. Check the dropdown menu under the Run button, and see if you have any options checked in the ErrorHandling section.
Might be irrelevant, but I would suggest to close variables that are related to the class from the variable viewer. As hovering over them might up somehow interact with variable viewer window.
Matt J
Matt J 2024년 3월 31일
편집: Matt J 2024년 5월 6일
Thanks, but I never open the variable viewer, so that couldn't be the issue.
As for the Error Handling section, I have nothing checked there, but even if I did, I don't see how it would explain the behavior. Any user would surely want to be able to activate those ErrorHandling options freely, without having to experience what I'm describing.

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

채택된 답변

Chaitanya
Chaitanya 2024년 5월 6일
Hello Matt
I understand that while debugging a script, when you try to hover over a variable in order to get the data tip, you end up hitting a breakpoint in a separate file which you have not set.
I suspect that there might be a possibility that a breakpoint is set programmatically using ‘dbstop’ commands such as
>>dbstop if error
As a troubleshooting step, I suggest you try clearing all the break points that may be set using the following command and checking if hovering over a variable is still hitting a break point.
>> dbclear all
You can also use the following command to see all the break points that is set which might be intended or unintended.
>> dbstatus
Refer to the following documents for more information on debugging and analysis of code.
I hope that the above information is helpful.
Thanks,
Chaitanya Krishna Sharma

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by