After having struggled with debugging on command-line (rather that jupyter that I had been using before), I realised that the trace of stack frames provides references to files and lines in the output. I had not noticed because the text was the same off-black as my terminal emulator.
I saw some tips about setting environment variables to get the right colour. I would have preferred to do it in my startup.jl, but alright. I try to set
JULIA_STACKFRAME_LINEINFO_COLOR to absolutely no avail.
When I looked in
errorshow.jl, I discovered these lines:
# filepath pathparts = splitpath(file) folderparts = pathparts[1:end-1] if !isempty(folderparts) printstyled(io, joinpath(folderparts...) * (Sys.iswindows() ? "\\" : "/"), color = :light_black) end # filename, separator, line # use escape codes for formatting, printstyled can't do underlined and color # codes are bright black (90) and underlined (4) printstyled(io, pathparts[end], ":", line; color = :light_black, underline = true) # inlined printstyled(io, inlined ? " [inlined]" : "", color = :light_black)
I.e. The colours are hardcoded. In view of this, why do the environment variables and functions such as
Base.stackframe_function_color even exist?
My current workaround is this addition to my startup.jl:
Is this the intended, canonical solution to this problem?