Executing code blocks with REPL workspace

If it’s a few lines of code, then I just use do import MyPackage: A, B, C.

There is also an export all macro call that can be used.

# export all
for n in names(@__MODULE__; all=true)
    if Base.isidentifier(n) && n ∉ (Symbol(@__MODULE__), :eval, :include)
        @eval export $n
    end
end

Usually though I might start a function within the package of interest and with just the lines of interest I want to test, and then run that from the REPL.

There are also packages such as GitHub - JuliaDebug/Infiltrator.jl: No-overhead breakpoints in Julia that you let step into a local environment of a function.