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

<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 15, 2023, 5:09pm UTC](https://discourse.julialang.org/t/executing-code-blocks-with-repl-workspace/107572/12 "2023-12-15T17:09:13Z")

</div>

> [@kealme](#):
>
> I’m using the latest release of VS Code.

VSCode automatically uses Revise.jl.

> [@mkitti](#):
>
> That makes most of this unnecessary during package development.

I wish it was unnecessary.

I think most people get around this limitation by working in the Main REPL module and only typing/executing full function calls defined in their package (Method 1 in [this link](https://discourse.julialang.org/t/how-to-use-vscode-and-repl-to-write-and-test-a-package/78818/50)), but that method doesn’t work very well if you need to test individual lines of your package code (rather than entire functions). Changing your REPL module is the only way I have found to do that.

I’m happy to be proven wrong and shown something simpler, but I’ve been asking about this for a long time, and no one has given me a good answer:

> [@How to use VSCode and REPL to write and test a package?](https://discourse.julialang.org/t/how-to-use-vscode-and-repl-to-write-and-test-a-package/78818):
>
> I have gone through a multitude of tutorials now but still can’t seem to wrap my head around the basics of how to write and test a package as I go. I don’t understand the proper way to add my package and its dependencies to the REPL namespace or the proper way to juggle between the Main and MyPackage modules. I keep getting errors that variables, functions, or packages are undefined. I just want the simplest, foolproof workflow. Open MyPackage folder in VSCode made with PkgTemplates.jl. Start …

---

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