Startup file not run on Windows 10?

I usually work on Linux, and here I have a .julia/config/startup.jl file which is run when I start julia. I have copied the content of this int my windows computer:
C:\Users\Torkel\.julia\config\startup.jl

However, it does not seem to work. I.e. it contain:

using Pkg

and

print_fields(x) = println(fieldnames(typeof(x)))

and both these fail on startup:

Pkg.status
print_fields

I have tried both in VSCode and using the terminal.

C:\Users\Torkel.julia\config\startup.jl
not
C:\Users\Torkel\.julia\config\startup.jl?

Sorry, markdown removed the \ in front of the . when I used normal text. Yes, the location is C:\Users\Torkel\.julia\config\startup.jl

  1. Is DEPOT_PATH set correctly i.e. is
    "C:\\Users\\Torkel\\.julia\\config\\startup.jl" in joinpath.(DEPOT_PATH, "config", "startup.jl") `

    true?

  2. Seems unlikely but: is there any alias/other mechanism by which julia is getting launched as julia --startup-file=no?

I was also thinking maybe there’s permission issues in reading the file, but denying read permission to my startup.jl and then trying to open Julia gives a clear error message that there’s a permission issue, so that’s probably not your issue. Note that I’m on Windows 11, and unless I mess with the permissions intentionally like just mentioned, Julia reads and uses the startup file without any issues.