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
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
dpb 2021-12-2
Under preferences, "Editor/Debugger" the checkbox "Highlight Current Line" has the option to select the highlight color.
  8 个评论
RAF
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by