# Trying Rebugger: not able to track

**URL:** <https://discourse.julialang.org/t/trying-rebugger-not-able-to-track/19667>\
**Category:** General Usage\
**Created:** [January 15, 2019, 3:58pm UTC](https://discourse.julialang.org/t/trying-rebugger-not-able-to-track/19667 "2019-01-15T15:58:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IljaK91](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iljak91/32/44301_2.png) [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Post date:** [January 15, 2019, 3:58pm UTC](https://discourse.julialang.org/t/trying-rebugger-not-able-to-track/19667/1 "2019-01-15T15:58:40Z")

</div>

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:

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

    try
        @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.")
    catch
        @warn "Could not load Rebugger."
    end
end

```

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

What am I doing wrong?

---

<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 15, 2019, 5:14pm UTC](https://discourse.julialang.org/t/trying-rebugger-not-able-to-track/19667/2 "2019-01-15T17:14:08Z")

</div>

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](https://github.com/timholy/Revise.jl/pull/230) may help.

---

<div class="post-metadata">

**Author:** ![IljaK91](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iljak91/32/44301_2.png) [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Post date:** [January 15, 2019, 5:15pm UTC](https://discourse.julialang.org/t/trying-rebugger-not-able-to-track/19667/3 "2019-01-15T17:15:59Z")

</div>

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