Debugger for command line script (works without REPL)?

Is there a debugger that will allow me to do something like this:

JULIA_PROJECT=/tmp/testenv julia /tmp/testenv/testdebugger.jl hithere
# testdebugger.jl (does not work)
println(string("julia environment is:\n ",ENV["JULIA_PROJECT"]))

using Revise,Debugger,ArgMacros

println("Parsing command line args...")
function main()
    args = @dictarguments begin
        @argumentrequired String teststr "--arraypath"
    end

    println("this is a test")

    println(teststr)
end

@enter main()

Error is:

ERROR: LoadError: Debugger.jl needs to be run in a Julia REPL