# Using Debugger.jl with almost all modules in compiled mode

**URL:** <https://discourse.julialang.org/t/using-debugger-jl-with-almost-all-modules-in-compiled-mode/127942>\
**Category:** Tooling\
**Tags:** debugging\
**Created:** [April 10, 2025, 5:03pm UTC](https://discourse.julialang.org/t/using-debugger-jl-with-almost-all-modules-in-compiled-mode/127942 "2025-04-10T17:03:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernardofpc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernardofpc/32/7783_2.png) [@bernardofpc](https://discourse.julialang.org/u/bernardofpc)\
**Post date:** [April 10, 2025, 5:03pm UTC](https://discourse.julialang.org/t/using-debugger-jl-with-almost-all-modules-in-compiled-mode/127942/1 "2025-04-10T17:03:26Z")

</div>

I read [Debugging extremely slow - #54 by mariusd](https://discourse.julialang.org/t/debugging-extremely-slow/53801/54) and it mentions `JuliaInterpreter`, which is not listed in the `Debugger.jl` documentation (I have only found the README.md on github). It would be helpful to have this usage of excluding almost all modules from being interpreted clearly documented (with an example) as to how to use it.

My intuition would be that something like this should work, but I have _not_ managed to discover the correct incantation:

```julia
using Revise # Not strictly needed, but probably very helpful in practice
using Debugger

using MyPackage

include("my_test_script") # Only defines functions and other constants

# Have some command like
# union!(JuliaInterpreter.compiled_modules, setdiff(Base.loaded_modules_array(), [Main, MyPackage]))
# to avoid interpreting too much code
# Either here
@enter my_fun()
# Or here, before the first "continue", "step" or something like that

```
