When I run large computation with 1,000's of iterations, then later look at the console looking for any errors or warnings generated, it is hard to locate them scrolling up and down, as the color of the messages by default is gray, which is close to the black color used for normal print output.
Is there a way to change the color so they are red?
There was a similar question here changing-color-of-error-messages but looking at it, it is for messages going to the notebook itself, not the console. And it requires changing the whole notebook default style as I understood the answer, which I do not think will have any effect as my messages go to the console?
I actually also tried to do what the above answer says which is to Then add those style cells:
but I had no idea how do that. How does one add new cell styles to a notebook? I looked at option at top of the notebook and see no option to add a cell style?
Here is a typical screen shot of the console showing what I mean
With 10's of thousands of lines, it is easier to spot these if they were in red while scrolling looking for the message when I hear a beep.
I have the following at the top of my notebook before starting the computation
CurrentValue[$FrontEnd, {"PrintAction"}] = {"PrintToConsole"}
CurrentValue[$FrontEnd, {"MessageOptions",
"KernelMessageAction"}] = {"PrintToConsole", "Beep"}
This causes everything (including normal Print) to go to console so I do not clutter the notebook.
I just need the color of any error or warning in the console to be red so easy to see. Any option in options inspector to do this easily?
V 13.0.1 on windows.
$MessagePrePrint = Style[#, Red, 18, Bold] &;
? Also take a look at$SyntaxHandler
. $\endgroup$$MessagePrePrint = Style[#, Red, 18, Bold] &;
thenDSolve[y'[x] == 1, y, z]
the error message on console still printed in gray byDSolve
Also when I did1/0
it showed only the1/0
in red, but the rest of the message still in gray. Screen shot !Mathematica graphics $\endgroup$