# How do I interactively test functions inside of a module?

**URL:** https://discourse.julialang.org/t/how-do-i-interactively-test-functions-inside-of-a-module/105002
**Category:** VS Code
**Tags:** question
**Created:** [October 16, 2023, 8:49am UTC](https://discourse.julialang.org/t/how-do-i-interactively-test-functions-inside-of-a-module/105002 "2023-10-16T08:49:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![fxgn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fxgn/32/202491_2.png) [@fxgn](https://discourse.julialang.org/u/fxgn)
#### Post date: [October 16, 2023, 8:49am UTC](https://discourse.julialang.org/t/how-do-i-interactively-test-functions-inside-of-a-module/105002/1 "2023-10-16T08:49:43Z")

</div>

In VSCode, I can send a function definition to the REPL and test it interactively from there. However, I can’t do that if the function is inside of a module but is not exported. How do I test private module functions while writing Julia code?

---

<div class="post-metadata">

### Author: ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)
#### Post date: [October 16, 2023, 9:06am UTC](https://discourse.julialang.org/t/how-do-i-interactively-test-functions-inside-of-a-module/105002/2 "2023-10-16T09:06:48Z")

</div>

You might want to take a look at ReTest.jl, though I don’t think these work with the test items idea in VS Code

---

<div class="post-metadata">

### Author: ![xgdgsc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xgdgsc/32/608_2.png) [@xgdgsc](https://discourse.julialang.org/u/xgdgsc)
#### Post date: [October 16, 2023, 9:32am UTC](https://discourse.julialang.org/t/how-do-i-interactively-test-functions-inside-of-a-module/105002/3 "2023-10-16T09:32:59Z")

</div>

You can use Revise.jl to make modifications inside Module available to an outside script that Using that Module and run the Module.function from the script with Julia: Execute line/Cell

---

<div class="post-metadata">

### Author: ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)
#### Post date: [October 16, 2023, 11:01am UTC](https://discourse.julialang.org/t/how-do-i-interactively-test-functions-inside-of-a-module/105002/4 "2023-10-16T11:01:02Z")

</div>

Oh, I think I misunderstood the question 😅. This is the right answer.

---

<div class="post-metadata">

### Author: ![gaspardb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gaspardb/32/36536_2.png) [@gaspardb](https://discourse.julialang.org/u/gaspardb)
#### Post date: [October 16, 2023, 12:16pm UTC](https://discourse.julialang.org/t/how-do-i-interactively-test-functions-inside-of-a-module/105002/5 "2023-10-16T12:16:52Z")

</div>

If you use VSCode you might be interested in [TestItems](https://github.com/julia-vscode/TestItemRunner.jl) which makes testing private functions inside modules easy.
