# State of the Debugger

**URL:** <https://discourse.julialang.org/t/state-of-the-debugger/4308>\
**Category:** General Usage\
**Tags:** debug\
**Created:** [June 16, 2017, 3:51pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308 "2017-06-16T15:51:04Z")\
**Posts on this page:** 20\
**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:** [June 16, 2017, 3:51pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/1 "2017-06-16T15:51:04Z")

</div>

Hi there,

I just wanted to ask about the state of the debugger in Julia. I am coming from Matlab and the debugger there is quite important for me to see where something is going wrong. For example, using NLsolve is a bit of a black box for me. If it does not work, I don’t know where to start to look for the problem. In contrast, in the meantime I copied the code to Matlab and could stop during the the execution of fsolve and check what is going wrong. Now it works in Matlab, but still it does not in Julia, although the code should be 1:1 equivalent.

I just would like to know if there is a plan on the development of the debugger.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)\
**Post date:** [June 16, 2017, 4:00pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/2 "2017-06-16T16:00:37Z")

</div>

Yes, there is a debugger:

[https://github.com/Keno/Gallium.jl](https://github.com/Keno/Gallium.jl)

It has not been updated to 0.6 yet, but I know that is a high priority and should be done relatively soon.

---

<div class="post-metadata">

**Author:** ![js135005](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/js135005/32/8219_2.png) [@js135005](https://discourse.julialang.org/u/js135005)\
**Post date:** [June 16, 2017, 6:16pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/3 "2017-06-16T18:16:07Z")

</div>

It’s worth noting that the latest Juno update has disabled Gallium integration until the Julia 0.6 update is done.

---

<div class="post-metadata">

**Author:** ![pkofod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pkofod/32/2179_2.png) [@pkofod](https://discourse.julialang.org/u/pkofod)\
**Post date:** [June 17, 2017, 5:22am UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/4 "2017-06-17T05:22:33Z")

</div>

While you’re asking for a debugger, you could also post the NLsolve question here on discourse (there’s not really a dedicated sub, but you could maybe try [Optimization (Mathematical) - JuliaLang](https://discourse.julialang.org/c/domain/opt) ). I’ll be happy to assist!

---

<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:** [June 17, 2017, 9:57am UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/5 "2017-06-17T09:57:22Z")

</div>

Thank you for all the replies. I will definitely follow it more closely and see how it plays out with 0.6.

Also thanks to pkofod, I might actually post there something next week as I get back to Uni. I am kind of curious to know, why it does not work in Julia at the moment.

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [October 8, 2017, 9:59am UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/6 "2017-10-08T09:59:01Z")

</div>

Any updates on this? Thanks!

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [October 8, 2017, 12:21pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/7 "2017-10-08T12:21:53Z")

</div>

ASTInterpreter2.jl works quite well in my experience, but doesn’t provide any breakpoints and stuff. Juno integration should hopefully be ready soonish (no promises though).

---

<div class="post-metadata">

**Author:** ![warpuv](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@warpuv](https://discourse.julialang.org/u/warpuv)\
**Post date:** [October 5, 2018, 7:49pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/10 "2018-10-05T19:49:17Z")

</div>

What is the current state of the debugger support (with breakpoints)? Will it be available in Julia 1.1 at least?

---

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [October 5, 2018, 7:53pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/11 "2018-10-05T19:53:12Z")

</div>

The development of a debugger is somewhat independent of the Julia version, because it is simply another package. Also, notice that I said **a** debugger, because it is possible for there to be many different julia debuggers, each with a different approach. To my knowledge, the only Julia 1.0 compatible debugger is [Rebugger.jl](https://github.com/timholy/Rebugger.jl), but I’m sure more are on the way.

---

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [October 8, 2018, 3:42am UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/12 "2018-10-08T03:42:43Z")

</div>

Due to the closure of a related [thread](https://discourse.julialang.org/t/how-do-you-use-debuggers/4580/140), I choose to ask my questions here - Is an official Julia-v1.0-compatible debugger being considered/planned at the moment? By ‘official’, I mean a debugger like the one (ASTIntepreter2) which works with v0.6 and can be embedded in **JuliaPro**. If so, when will it be available? I know that an exact date is impossible. So I’m asking for a (very, or very very) rough estimate, which, at least, can give me a **hope**. I **really really really** depend on a reliable debugger to work with large packages written by others. So any info is much appreciated!!!

---

<div class="post-metadata">

**Author:** ![Noa\_Feldman](https://avatars.discourse-cdn.com/v4/letter/n/d26b3c/32.png) [@Noa\_Feldman](https://discourse.julialang.org/u/Noa_Feldman)\
**Post date:** [November 14, 2018, 4:43pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/13 "2018-11-14T16:43:32Z")

</div>

Since the thread about debuggers ([here](https://discourse.julialang.org/t/how-do-you-use-debuggers/4580/122)) was closed, I’m adding my answer to it here -  
I rely heavily on debuggers and the lack of a proper debugger for Julia and Juno is one of the main reasons I don’t switch to Julia.  
I use breakpoints, most of all, as a way of finding my own mistakes - I can write a very readable code in Julia, but even in the most readable code it is easy to miss a displaced minus sign, an edge case not handled in some inner function etc. When working with a large code divided to many sections, breakpoints can save hours looking for the problem, and an uncountable amount of frustration!  
Same goes for when using someone else’s code, especially when this code is meant to create abstraction of the methods I eventually plan to use - in general I’m not even trying to understand this code (otherwise, it wouldn’t be abstraction), but when something is not working as I expect, I need all the help I can get understanding it.

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [November 16, 2018, 7:15pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/14 "2018-11-16T19:15:16Z")

</div>

I agree. Especially in looping code that doesn’t error but produces an incorrect result, being able to track down how the loop is misbehaving is critical.

I’ve tried Rebugger.jl but it keeps telling me what I’m trying to look at is “unavailable”. There seems to be some stepping functions in Juno but they don’t seem to do anything.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [November 16, 2018, 10:18pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/15 "2018-11-16T22:18:44Z")

</div>

People posting here may be interested in [Compiler work priorities](https://discourse.julialang.org/t/compiler-work-priorities/17623) in which I’ve outlined the rough priorities for compiler-related work, including tools like debuggers.

---

<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:** [November 17, 2018, 10:37am UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/16 "2018-11-17T10:37:33Z")

</div>

You probably all know about [Rebugger](https://github.com/timholy/Rebugger.jl). I haven’t had any time to work on it lately, and probably won’t for a couple more months. I’d like to encourage people who are impatient for a debugger to jump in and help make it better. Here are reasons to consider this:

- Rebugger and Revise (upon which Rebugger is based) are pretty extensively documented, even down to the internals. I did this precisely to make it easier for others to contribute, but if anything it’s had the opposite effect.
- Rebugger is tiny: the core `src/debug.jl` file is currently 600 lines of code and, other than Revise, has no significant dependencies.
- Rebugger does _not_ interact with call stacks; everything is done in terms of julia expressions. That means anyone who has written or edited a macro or otherwise worked with Julia expressions has the background needed to pitch in—this is not rocket science.
- I’ve [outlined solutions](https://discourse.julialang.org/t/ann-rebugger-interactive-debugging-for-julia-0-7-1-0/13843/18) to things like how to add breakpoints. Once breakpoints are added, I think it can interact with graphical debuggers (aka, Juno).
- The Julia compiler team’s priorities linked above by Stefan (which is a fantastic list, and ordered the same way I’d order it) suggests it will be a while before there’s another solution, unless someone outside the team picks up Gallium on their own.

Here are some of the most impactful ways to help out:

- [\*] Revise’s `get_def` still fails to fetch expressions for too many functions. The failure presumably occurs in the signature-Dict lookup (`sigtmap`) as outlined [here](https://timholy.github.io/Revise.jl/stable/internals.html#The-structure-of-Revise's-internal-representation-1). Figuring what’s failing, and fixing it, would be one of the most important contributions. (Progress: [Use type intersection to match signatures to those of methods by timholy · Pull Request #213 · timholy/Revise.jl · GitHub](https://github.com/timholy/Revise.jl/pull/213), [Capture methods that have docstring + performance annotation by timholy · Pull Request #215 · timholy/Revise.jl · GitHub](https://github.com/timholy/Revise.jl/pull/215), [Better handling of stacktraces by timholy · Pull Request #52 · timholy/Rebugger.jl · GitHub](https://github.com/timholy/Rebugger.jl/pull/52))
- Add breakpoints
- When presenting expressions for Rebugger don’t expand macros (ref [Avoid expanding macros in function bodies with a docstring by timholy · Pull Request #210 · timholy/Revise.jl · GitHub](https://github.com/timholy/Revise.jl/pull/210))
- (Fairly simple with SnoopCompile, but tedious) Reduce Rebugger’s latency when you first start Julia or first load Rebugger
- Fix [display problem with long function · Issue #29 · timholy/Rebugger.jl · GitHub](https://github.com/timholy/Rebugger.jl/issues/29) (would benefit from someone who knows the REPL or is willing to learn) (note this is not necessary if Juno is your real target)
- Fix [Revise should "follow" files that go from add-\>dev · Issue #146 · timholy/Revise.jl · GitHub](https://github.com/timholy/Revise.jl/issues/146)

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 17, 2018, 10:44am UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/17 "2018-11-17T10:44:36Z")

</div>

> [@tim.holy](#):
>
> pretty extensively documented, even down to the internals. I did this precisely to make it easier for others to contribute, but if anything it’s had the opposite effect.

I am not sure about causality here — I think you may not be getting contributions because people assume you will just fix things anyway 😉 It’s good that you made your plans clear for the near future, which could change this.

Personally, while I find Rebugger very nice, I find Revise so powerful that I almost never need it. I have never grokked debuggers, and with Julia I developed a programming style that doesn not need it. This is possible because in Julia there is no penalty for writing small functions that do one thing, and those can easily be tested.

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [November 21, 2018, 3:41pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/19 "2018-11-21T15:41:36Z")

</div>

As a newcomer, I’m just not sure how to use these tools to accomplish what I need. I believe you all that together these can do a lot of what a debugger would do, but I just don’t get how to use them.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 21, 2018, 5:50pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/20 "2018-11-21T17:50:46Z")

</div>

What have you tried from these tools?

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [November 21, 2018, 6:09pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/21 "2018-11-21T18:09:34Z")

</div>

I did Esc E with Rebugger on a function and couldn’t interpret what it was showing me or how to continue from there. What am I supposed to do with the @eval block it generates at the prompt?

I did figure out that the “untracked” error I mentioned before meant I had to load code via `incluedt`.

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [November 21, 2018, 7:23pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/22 "2018-11-21T19:23:36Z")

</div>

There’s a talk on rebugger on youtube from juliacon2018 that shows the use quite nicely

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [January 23, 2019, 12:55pm UTC](https://discourse.julialang.org/t/state-of-the-debugger/4308/23 "2019-01-23T12:55:28Z")

</div>

Did anyone mention this [https://github.com/JuliaDebug/ASTInterpreter2.jl](https://github.com/JuliaDebug/ASTInterpreter2.jl)? It’s a debugger and I tried it and it works pretty well!

[Next page](https://discourse.julialang.org/t/state-of-the-debugger/4308.md?page=2)
