Trying Rebugger: not able to track

I have some very simple code:

g(x) = 1 + x

What I want to do is use Rebugger.jl and step into g. The focus is on trying Rebugger and learning it and less on actually debugging anything. However, I get the following error after trying to step into g(2):

┌ Warning: Main [top-level] not found, not able to track└ @ Revise C:\Users\Ilja\.julia\packages\Revise\yp5KG\src\Revise.jl:695The expression for method g(x) in Main at C:\....\ and Information\Code\Test.jl:613 was unavailable. Perhaps it was untracked or generated by code.

I have this in my startup.jl to make sure that everything is correctly loaded:

atreplinit() do repl
        @eval using Revise
        @async Revise.wait_steal_repl_backend()
        display("Loading Revise worked.")
        @warn "Could not load Revise."

        @eval using Rebugger
        # Activate Rebugger's key bindings
        Rebugger.keybindings[:stepin] = "\e[17~"      # Add the keybinding F6 to step into a function.
        Rebugger.keybindings[:stacktrace] = "\e[18~"  # Add the keybinding F7 to capture a stacktrace.
        display("Loading Rebugger worked.")
        @warn "Could not load Rebugger."

I have no problem when I try to step into a function in Base, for example max(1,2).

What am I doing wrong?

Currently, Rebugger can’t step in to methods you define at the REPL. Try putting it in a file and then loading it with includet.

There are still many methods for which it can’t get the original code. For some packages (and Base) Major enhancements to parsing by timholy · Pull Request #230 · timholy/Revise.jl · GitHub may help.

Thanks for the quick reply! This makes sense, I’ll try it :slight_smile: