# Executing code blocks with REPL workspace

**URL:** <https://discourse.julialang.org/t/executing-code-blocks-with-repl-workspace/107572>\
**Category:** General Usage\
**Created:** [December 13, 2023, 3:51pm UTC](https://discourse.julialang.org/t/executing-code-blocks-with-repl-workspace/107572 "2023-12-13T15:51:31Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [December 15, 2023, 6:48pm UTC](https://discourse.julialang.org/t/executing-code-blocks-with-repl-workspace/107572/13 "2023-12-15T18:48:11Z")

</div>

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](https://discourse.julialang.org/t/exportall/4970/16) that can be used.

```julia
# 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](https://github.com/JuliaDebug/Infiltrator.jl) that you let step into a local environment of a function.

---

_[View the full topic](https://discourse.julialang.org/t/executing-code-blocks-with-repl-workspace/107572)._
