Debugger.@enter: failed to lookup source code, showing lowered code

I’m trying to use Debugger.@enter via the REPL (not via VS Code or Juno). However, I’m getting a message that says

failed to lookup source code, showing lowered code:

In an older thread the only recommendation was to make sure that your source files are saved. I double checked that all my files were saved, so that’s not the problem. My code is in a package, so the workflow is like this:

julia> using Stuff  # load my package

julia> obj =  # build an object who's type is defined in Stuff.jl

julia> Debugger.@enter foo(obj)  # foo is defined in Stuff.jl
failed to lookup source code, showing lowered code:
# lowered code shown here

Does anyone know what might cause this aside from files not being saved?

Note that this is not an isolated incident. I’ve encountered the same problem while working on a different package.

Are you using Revise? The ability of the debugger to locate your source code is significantly improved by using Revise.

Be sure you remember PSA: pin Revise at 2

1 Like

We also recently fixed a regression with source code lookup (https://github.com/timholy/CodeTracking.jl/pull/61) so make sure your dependencies are up to date.

3 Likes