# Debugging extremely slow

**URL:** <https://discourse.julialang.org/t/debugging-extremely-slow/53801>\
**Category:** Tooling\
**Tags:** question\
**Created:** [January 22, 2021, 7:18pm UTC](https://discourse.julialang.org/t/debugging-extremely-slow/53801 "2021-01-22T19:18:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [January 23, 2021, 8:32am UTC](https://discourse.julialang.org/t/debugging-extremely-slow/53801/4 "2021-01-23T08:32:49Z")

</div>

Believe it or not, I suspect that one of Matlab’s advantages here is that all the performance-sensitive stuff is written in C and their debugger doesn’t step into it. So their debugger only lets you look at surface level logic, but the flip side is that it doesn’t really hurt performance. Conversely, the Julia debugger goes down to every single operation, and that just kills performance.

As a first cut you can try

```julia
julia> using JuliaInterpreter

julia> push!(JuliaInterpreter.compiled_modules, Base)
Set{Module} with 2 elements:
  Base.Threads
  Base

```

and see if it helps. (That will cause it to skip debugging for every method defined in Base.) Or, if you _really_ want to exclude everything in Base, do

```julia
julia> using MethodAnalysis

julia> visit(Base) do item
           isa(item, Module) && push!(JuliaInterpreter.compiled_modules, item)
           true
       end

```

which will block every submodule of Base too. You might need to add some stdlibs too.

---

_[View the full topic](https://discourse.julialang.org/t/debugging-extremely-slow/53801)._
