When debugging in R2021b, the current line is highlighted in light green making it impossible to read the line when the text color is light and background is dark.
20 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
This happens only when the function being viewed is above in the call-stack from the one at which execution has stopped.
Any idea how this color might be changed?
EDIT:
See below an example showing how to reproduce this problem, this time with the default colors:
7 commentaires
Réponse acceptée
Rik
le 24 Mar 2022
The line highlight has been changed to a much darker shade of green in R2022a. This leaves code readible if you have set your font color to something light.
So there isn't a solution in R2021b, but R2022a will get you what you need.
2 commentaires
Plus de réponses (1)
dpb
le 2 Déc 2021
Under preferences, "Editor/Debugger" the checkbox "Highlight Current Line" has the option to select the highlight color.
8 commentaires
RAF
le 27 Jan 2022
The highlighting follows user specification for the most recent call on the stack, but all predecessor calls appear with a mysterious MATLAB-default highlighting. In the attached image, the caller line is blindingly highlighted in the default shading while the callee line is subtly highlighted per user preference. The unreadable default highlighting is, by the way, visible all the rest of the way up the stack. Curiously, the highlighting for me is not pale green, but a gray value (RGB DCDCDC hex). This difference with previous posts may suggest that there is some offsetting relative to another unknown, but--perhaps--user specified preference or window-manager setting, though I have no grays in my MATLAB scheme.
By the way, the editor's current-line highlighting only reflects the cursor position, not the execution position, which just coincidentally happens to be instantly set to the same line when stopped at a breakpoint or stepping during debugging. In other words, during a breakpoint pause, one can tap on any line in the file and move the current-line highlighting pointed out by @dpb, leaving only the dark green filled arrow and overline, but with unhighlighted text at the execution point. That being noted, it is likely that there is no explicit user preference for call-stack highlighting. As you can see, though, there should be.
Andrea De Polis
le 16 Fév 2022
I do have the same, very annoying issue. I can see the highlighted lines only by highlighing them with the cursor.
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!