# 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:** 9

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [December 14, 2023, 1:19pm UTC](https://discourse.julialang.org/t/executing-code-blocks-with-repl-workspace/107572/9 "2023-12-14T13:19:58Z")

</div>

This happens all the time for me, and it is very annoying. Same issue as here:

> [@VSCode REPL Namespaces/Modules](https://discourse.julialang.org/t/vscode-repl-namespaces-modules/103170):
>
> How is this still happening? How are you living with this? I expected the [REPL module switching](https://github.com/JuliaLang/julia/pull/33872) released with Julia 1.9 to fix this issue. (DataFrames) julia\> x = 3 # Ctrl + Enter 3 (DataFrames) julia\> x # Typed into REPL ERROR: UndefVarError: `x` not defined I have a clone of the DataFrames package open. [image] I have activated the current directory environment. [image] [image] I have chosen the DataFrames module as the active module with the VSCode GUI. [image] I have used the n…

You need to change the REPL module to match your package module. Otherwise, the REPL and package namespaces are kept separate. I still do not understand why this isn’t done automatically.

---

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