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 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Rik
2022-3-24
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.
更多回答(1 个)
dpb
2021-12-2
Under preferences, "Editor/Debugger" the checkbox "Highlight Current Line" has the option to select the highlight color.
8 个评论
RAF
2022-1-27
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
2022-2-16
I do have the same, very annoying issue. I can see the highlighted lines only by highlighing them with the cursor.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!