# Julia debugger cheat sheet

**URL:** https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039
**Category:** New to Julia
**Tags:** cheatsheets
**Created:** [February 11, 2017, 4:21pm UTC](https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039 "2017-02-11T16:21:18Z")
**Posts on this page:** 6
**Page:** 1

<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: [February 11, 2017, 4:21pm UTC](https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039/1 "2017-02-11T16:21:18Z")

</div>

Is there a cheat sheet for Gallium and ASTInterpreter? The [Julia cheat sheet](https://math.mit.edu/~stevenj/Julia-cheatsheet.pdf) helped me a lot and I wonder if there is one for the debugger.

BTW, other than the two video clips that can be found on youtube and the [readme](https://github.com/Keno/ASTInterpreter.jl) text, is there any more serious documentation or explanation for Gallium + ASTInterpreter?

---

<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: [February 12, 2017, 8:45am UTC](https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039/2 "2017-02-12T08:45:47Z")

</div>

Just use `?` at the prompt:

```julia
julia> using Gallium

julia> @enter 1+1
In int.jl:32
31 -{T<:BitInteger}(x::T, y::T) = box(T, sub_int(unbox(T,x),unbox(T,y)))
32 +{T<:BitInteger}(x::T, y::T) = box(T, add_int(unbox(T,x),unbox(T,y)))
33 *{T<:BitInteger}(x::T, y::T) = box(T, mul_int(unbox(T,x),unbox(T,y)))
34  

About to run: ((intrinsic function #1))(Int64,1)
1|debug > ?
  Basic Commands:
  - n steps to the next line
  - s steps into the next call
  - finish runs to the end of the function
  - bt shows a simple backtrace
  - `stuff runs stuff in the current frame's context
  - fr v will show all variables in the current frame
  - f n where n is an integer, will go to the n-th frame.

  Advanced commands:
  - nc steps to the next call
  - ns steps to the next statement
  - se does one expression step
  - si does the same but steps into a call if a call is the next expression
  - sg steps into a generated function
  - shadow shows the internal representation of the expression tree
   (for debugger debugging only)
  - loc shows the column data for the current top frame,
   in the same format as JuliaParsers's testshell.

```

---

<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: [February 12, 2017, 11:32am UTC](https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039/3 "2017-02-12T11:32:56Z")

</div>

Thanks. That’s good but when it’s printed, it bumps up what I have just done at the REPL, which is irritating. I think I’ll just print out the readme/help text and post it somewhere near my workstation.

Another question - how to list the neighboring source lines above and below current line. In other [Debugger](https://github.com/toivoh/Debug.jl), this is `l [n]`, where the number `n` of the source lines that will be printed is optional.

---

<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: [September 18, 2017, 4:21pm UTC](https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039/4 "2017-09-18T16:21:27Z")

</div>

I noticed that the Gallium.jl project at Github seems dead ([https://github.com/Keno/Gallium.jl](https://github.com/Keno/Gallium.jl)). Latest commit is from 8 months ago. Is this a bad sign?

---

<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: [September 18, 2017, 4:34pm UTC](https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039/5 "2017-09-18T16:34:26Z")

</div>

Keno posted recently that he is working on the upgrade. However, from what I’ve seen, it’s been lower in priority than quite a number of 0.6/1.0 related issues.

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [September 18, 2017, 8:01pm UTC](https://discourse.julialang.org/t/julia-debugger-cheat-sheet/2039/6 "2017-09-18T20:01:17Z")

</div>

I understand that the current work happens here: [https://github.com/Keno/ASTInterpreter2.jl](https://github.com/Keno/ASTInterpreter2.jl)
