# Julia 1.6 Stacktrace

**URL:** <https://discourse.julialang.org/t/julia-1-6-stacktrace/57981>\
**Category:** General Usage\
**Created:** [March 25, 2021, 11:39pm UTC](https://discourse.julialang.org/t/julia-1-6-stacktrace/57981 "2021-03-25T23:39:30Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [March 26, 2021, 1:27pm UTC](https://discourse.julialang.org/t/julia-1-6-stacktrace/57981/14 "2021-03-26T13:27:23Z")

</div>

For some sort of workaround, you can put this in your `.julia/config/startup.jl` file and tweak the color of the paths on the second line:

```julia
@eval Base begin

path_color = :red

function print_stackframe(io, i, frame::StackFrame, n::Int, digit_align_width, modulecolor)
    file, line = string(frame.file), frame.line
    stacktrace_expand_basepaths() && (file = something(find_source_file(file), file))
    stacktrace_contract_userdir() && (file = replaceuserpath(file))

    # Used by the REPL to make it possible to open
    # the location of a stackframe/method in the editor.
    if haskey(io, :last_shown_line_infos)
        push!(io[:last_shown_line_infos], (string(frame.file), frame.line))
    end

    inlined = getfield(frame, :inlined)
    modul = parentmodule(frame)

    # frame number
    print(io, " ", lpad("[" * string(i) * "]", digit_align_width + 2))
    print(io, " ")

    StackTraces.show_spec_linfo(IOContext(io, :backtrace=>true), frame)
    if n > 1
        printstyled(io, " (repeats $n times)"; color=:light_black)
    end
    println(io)

    # @
    printstyled(io, " " ^ (digit_align_width + 2) * "@ ", color = :light_black)

    # module
    if modul !== nothing
        printstyled(io, modul, color = modulecolor)
        print(io, " ")
    end

    # filepath
    pathparts = splitpath(file)
    folderparts = pathparts[1:end-1]
    if !isempty(folderparts)
        printstyled(io, joinpath(folderparts...) * (Sys.iswindows() ? "\\" : "/"), color = path_color)
    end

    # filename, separator, line
    # use escape codes for formatting, printstyled can't do underlined and color
    # codes are bright black (90) and underlined (4)
    function print_underlined(io::IO, s...)
        colored = get(io, :color, false)::Bool
        start_s = colored ? text_colors[path_color] * "\033[4m" : ""
        end_s = colored ? "\033[0m" : ""
        print(io, start_s, s..., end_s)
    end
    print_underlined(io, pathparts[end], ":", line)

    # inlined
    printstyled(io, inlined ? " [inlined]" : "", color = path_color)
end

end

```

 ![bild](https://global.discourse-cdn.com/julialang/original/3X/8/e/8e103f57fb0740d704c3c606efce901369971223.png)

---

_[View the full topic](https://discourse.julialang.org/t/julia-1-6-stacktrace/57981)._
