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.
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Amit Hochman
el 2 de Dic. de 2021
Comentada: Steven Gaj
el 26 de En. de 2024
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 comentarios
Respuesta aceptada
Rik
el 24 de Mzo. de 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 comentarios
Más respuestas (1)
dpb
el 2 de Dic. de 2021
Under preferences, "Editor/Debugger" the checkbox "Highlight Current Line" has the option to select the highlight color.
8 comentarios
RAF
el 27 de En. de 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
el 16 de Feb. de 2022
I do have the same, very annoying issue. I can see the highlighted lines only by highlighing them with the cursor.
Ver también
Categorías
Más información sobre Graphics Performance 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!