Hovering mouse over a variable suddenly doesn't show present value in R2015b?

Ever since I installed MATLAB on my computer this feature was working, then recently it does not. I saw someone else had an issue but it was solved by re-enabling the feature in preferences.
Any reason why (a) this feature was always working in my R2015b, and is now not saving to be always on when I open matlab.
And, (b) why when this feature is enabled, it does not work in my local functions, and only in my main?
I'm getting frustrated since it greatly speeds up my debugging!
Thanks!

1 Comment

Is this the case for all variables in all cases or some specific circumstance? e.g. a variable that is both the input and the output of a function will not be visible from the calling function while the function that operates on it is active.

Sign in to comment.

Answers (3)

I got this issue in matlab 2018a. I found that one of my variable name is 'eval'. 'eval' is an inbuild function name, so i changed the variable name. now it fixed.

3 Comments

Wow, luckiest find ever. One of my variables was called 'eval' as well.
Same problem here, though I didn't have any variable called "eval". so I looked for any potential variable that could be an inbuild function name and I found a one called "exist" so I changed its name and it worked just fine.
Thanks! I was calling eig, which returns eigenvectors and eigenvalues. For the latter, I'd picked the name "eval". I'm disappointed that the collision broke the debugger.

Sign in to comment.

Hey Cynthia, I believe the feature to which you are referring is the ability to view variable values in a data tip window while your execution is paused in debug mode. If so, this feature should be enabled by default. The documentation linked to below describes how to use this feature.
I am a little unclear on how the "Enable datatips in edit mode" preference affects this feature. I will submit a request that his documentation be enhanced.
That documentation also mentions some cases when the feature will not work--such as when MATLAB is in the process of overwriting a variable. However, if you believe you are not able to use the feature when you should, I would encourage you to uninstall and reinstall MATLAB. If you are still experiencing the issue, please contact MathWorks Technical Support.
If I understand your second question correctly, I believe the reason is that the MATLAB data tip can only display the values of the variables in the current workspace. I think this is what Adam was getting at. If your debugger is paused in your "main" script, it will not be able to display variable values in function workspaces. You can read more about this distinction in the documentation linked to below.
This happened to me, but it was not working in only in one file. Also, the arrow was not appearing on the line the debugger was to execute next. After quite a bit of time and frustration, I tried closing the file from the editor and reopening it. That fixed the problem! I imagine something got goofed up between what I was seeing in the editor and the representation of the code that the debugger was using.

3 Comments

At least by R2019b, I've noticed that sometimes tooltips or variable datatips will end up breaking after MATLAB has been open for a while. A lot of the times it breaks, I can click around and find that there's a stale datatip/tooltip that's still open and receives mouse events, but is completely invisible. I usually notice the problem not because the datatips stop working, but there's a rectangular area in the editor where I can't place the cursor. The variable datatips don't, but other types of invisible tooltips may have hyperlinks which can lead to the docs browser opening when you try to click on the editor.
That said, the stale, invisible datatips/tooltips and the completely dead datatips/tooltips seem to be two different problems which don't always occur together. It's hard to tell when we're talking about things that are literally invisible.
Either way, the only way I've found to reliably fix the problem is to restart MATLAB. I eventually just stopped using datatips out of avoidance. I'd suspect this problem doesn't extend to the new editor, but I don't know.
In my case, restarting MATLAB didn't fix the problem because the problematic file would stil be open in the editor upon restart. Closing the file and reopening it fixed the problem even without restarting MATLAB. I don't know why, but it's a very easy thing worth trying.
I'm probably mentioning something that's not really relevant then, either due to the difference in version, or maybe because I am (was) using the editor datatips outside of debugger mode.

Sign in to comment.

Categories

Products

Asked:

on 13 Mar 2017

Commented:

DGM
on 7 May 2024

Community Treasure Hunt

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

Start Hunting!