Hovering in debug mode triggers a jump into get.property() methods
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Matt J
el 25 de Mzo. de 2024
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 comentarios
Mario Malic
el 26 de Mzo. de 2024
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.
Respuesta aceptada
Chaitanya
el 6 de Mayo de 2024
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Software Development Tools en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!