Julia debugging is extremely slow

If the OP wants to seriously compare debuggers, then Julia is not a fair match against Python, because Python is an interpreted language and debuggers are almost “native” to that execution model. You also cannot compare Julia to C or Fortran, because those are AOT languages with decades of mature tooling and well-established debug information pipelines.

So I took a look at how other JIT language like the JVM/Java (HotSpot) and the JavaScript V8 engine manage to deliver a smooth debugging experience.

What HotSpot and V8 get right

They make debugging a runtime feature, not a bolt-on. In practice that means:

  • Deoptimization on demand: when you hit a breakpoint/step, the runtime can back out of aggressive optimizations (e.g., inlining) so source-level stepping still makes sense.

  • Tiered execution: they can drop from optimized JIT code to a more debug-friendly tier when precision matters.

  • Rich metadata + safepoints: the runtime keeps enough mapping info to reconstruct call stacks and variables reliably.

None of this came for free: these capabilities are the result of decades of sustained industrial effort in runtimes, compilers, and tooling.

Why Julia feels harder in practice

Julia’s performance model leans heavily on aggressive specialization and LLVM optimizations. That’s great for speed, but it makes “stable source views” harder (especially across inlining and invalidation).

Even today, Julia’s mainstream source-level debugging still relies on interpreter-based execution (via JuliaInterpreter). As pfitzseb notes in post #33, a mixed compiled/interpreted setup mainly improves performance by minimizing how much code is interpreted; it’s essentially a workaround rather than a full replacement for interpretation.

Summary

It’s only natural that debuggers feel great in Python and in AOT languages: the execution model makes the tooling almost inevitable. But a first-class debugger is by no means unprecedented in the JIT world. When we look at HotSpot and V8 delivering genuinely smooth debugging through deoptimization, tiering, on-stack replacement, and carefully maintained metadata, it becomes hard to escape a simple conclusion: Julia has not yet made building that level of runtime debugging machinery a top priority.

14 Likes