# breakpoint atom juno

**URL:** <https://discourse.julialang.org/t/breakpoint-atom-juno/17931>\
**Category:** New to Julia\
**Created:** [November 23, 2018, 10:44pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931 "2018-11-23T22:44:59Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandro\_di\_nola](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@alessandro\_di\_nola](https://discourse.julialang.org/u/alessandro_di_nola)\
**Post date:** [November 23, 2018, 10:44pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/1 "2018-11-23T22:44:59Z")

</div>

Dear all,  
I’m new to Julia. Can someone tell me how to set a breakpoint in the atom/juno editor? I’m considering switching from Matlab to Julia but I noticed that the atom/juno editor is a bit underdeveloped. Using breakpoints is really important when debugging  
Thanks!!

---

<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 24, 2018, 9:01am UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/2 "2018-11-24T09:01:17Z")

</div>

You can use [Rebugger](https://github.com/timholy/Rebugger.jl), insert

```julia
error("here's a breakpoint")

```

into the code, then use Meta-s to capture the stacktrace. (This is similar to `dbstop if error` where you create the error deliberately.)

---

<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 24, 2018, 9:36am UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/3 "2018-11-24T09:36:24Z")

</div>

> [@alessandro\_di\_nola](#):
>
> I noticed that the atom/juno editor is a bit underdeveloped

I disagree. It doesn’t have inbuilt breakpoints because the Julia debugger currently does not have that. But otherwise it is highly featured. Which IMHO is quite incredible when you consider that Juno has essentially been two people’s spare-time unsalaried project next to their studies, not the main interface to a hundreds-of-millions-dollar business like matlab’s editor.

Of course we can’t evaluate what you mean by this because you don’t expand further on how exactly it strikes you as undeveloped.

Thankfully, you still got a great answer that you can try out.

---

<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:** [November 24, 2018, 9:56am UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/4 "2018-11-24T09:56:47Z")

</div>

I’ve been meaning to work on  
[https://github.com/timholy/Rebugger.jl/issues/18](https://github.com/timholy/Rebugger.jl/issues/18)  
for some time, but might actually get around to it soon 🙂 (once the [remote process support](https://github.com/JunoLab/atom-julia-client/pull/531) is ready for a release).

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [November 24, 2018, 12:59pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/5 "2018-11-24T12:59:45Z")

</div>

I agree, atom is a good editor, matlab’s editor feels very handicapped in comparison. Atom is highly customizable and supports plug-ins that make everyday coding much easier.

---

<div class="post-metadata">

**Author:** ![alessandro\_di\_nola](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@alessandro\_di\_nola](https://discourse.julialang.org/u/alessandro_di_nola)\
**Post date:** [November 24, 2018, 2:25pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/6 "2018-11-24T14:25:54Z")

</div>

Thanks a lot for your answer, I’ll give it a try!

---

<div class="post-metadata">

**Author:** ![alessandro\_di\_nola](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@alessandro\_di\_nola](https://discourse.julialang.org/u/alessandro_di_nola)\
**Post date:** [November 24, 2018, 2:26pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/7 "2018-11-24T14:26:15Z")

</div>

Being new to the Julia language I don’t know the Juno/Atom editor as well as I know the Matlab editor, so please take the following with a grain of salt.

1. The most important are breakpoints for debugging. In my view this is the main issue.
2. The error messages tell me the relevant line of code, but the iJulia cells do not tell me line numbers, so I had to manually count them.
3. You can’t mouse-over end’s to see which if/for/while they relate to.
4. Suppose I have generated the array A: in matlab editor I can ctrl-D over A (when debugging) and open it in a spreadsheet, to check values in real time. Can I do the same with Atom?
5. You have a messy code with if-for-end not aligned: in matlab you can select the code and press ctrl+I to automatically indent. Can you do the same with Atom?

It would be great if the future releases of Atom could fix some of these issues, especially (1)

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [November 24, 2018, 2:35pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/8 "2018-11-24T14:35:13Z")

</div>

Regarding point (2), you can easily [display line numbers in IJulia/Jupyter.](https://randyzwitch.com/line-numbers-ipython-notebook/)

---

<div class="post-metadata">

**Author:** ![vietspaceanh](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vietspaceanh](https://discourse.julialang.org/u/vietspaceanh)\
**Post date:** [November 24, 2018, 3:48pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/9 "2018-11-24T15:48:04Z")

</div>

For 5, you can Ctrl+Shift+P and type “indent” to Toggle Auto Indent. Or you can add a new Keybinding as in [https://stackoverflow.com/questions/22611377/how-to-auto-indent-code-in-the-atom-editor](https://stackoverflow.com/questions/22611377/how-to-auto-indent-code-in-the-atom-editor)

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [November 24, 2018, 8:04pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/10 "2018-11-24T20:04:49Z")

</div>

There are a bunch of discussions about the situation with debugging - you are not alone in wanting it, but the short answer is that there are other things that are higher priority among the core devs.

In any case, this is not a juno issue - if there were a traditional debugger, it would be integrated into juno (in fact, this used to be the case).

---

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [November 24, 2018, 8:44pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/11 "2018-11-24T20:44:09Z")

</div>

I thought the Juno gets funded by Julia computing. It is incredible that it is done by unpaid volunteers. A good IDE really makes new adopters’ life much easier.

---

<div class="post-metadata">

**Author:** ![Balinus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/balinus/32/243_2.png) [@Balinus](https://discourse.julialang.org/u/Balinus)\
**Post date:** [November 24, 2018, 8:58pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/12 "2018-11-24T20:58:08Z")

</div>

For point 5, not sure if I configured something or not but I think you can select what you want to indent and press `ctrl-m`.

For what it’s worth, I spent about 15 years with Matlab, so you can imagine that I had some habits, to say the least. When I switched to Julia, I also had some growing pain, such as a need for breakpoints, a nice array viewer, etc. The thing is: Julia will not be similar to Matlab (and vice-versa!). You’ll have to adapt some of your workflow in the end. Now, after 2 years using Julia, I can say that I do no longer need a debugger, nor do I need an array viewer. The former is because I now heavily relies on small functions (which is easy to debug live in the REPL) an the latter is because I just plot the array to see if there’s something wrong with the data (or develop small debug functions to analyze the arrays). And finally, now that I use Atom/Juno on a daily basis, I really think that the Matlab editor is in fact really poor in terms of features and when I open Matlab, I actually use Atom for the nice syntax highlighting!

An alternative to Atom/Juno is VSCode with the Julia plugin. It’s another nice option.

For a nice workflow, I can’t recommend enough [Revise.jl](https://github.com/timholy/Revise.jl)

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [November 24, 2018, 9:32pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/13 "2018-11-24T21:32:27Z")

</div>

Juno actually has an array viewer, it’s visible in the first screenshot at [http://junolab.org](http://junolab.org), titled “workspace”

---

<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 25, 2018, 8:24am UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/14 "2018-11-25T08:24:16Z")

</div>

> [@kevbonham](#):
>
> there are other things that are higher prioritybamong the core devs.

Frankly, I would not have high hopes for any free software project for which the people who really want it and the people who can write/maintain it are almost disjoint sets.

I think the most reasonable approach for a newcomer to Julia is to take a step back and re-evaluate their approach to debugging and programming style in general.

IMO the good question to ask is the following: the people who _could_ write a debugger are apparently writing a lot of code. Judging from the issues, it has bugs. These are eventually fixed. So they must be debugging.

How are they doing it? What tools are they using? How do they structure their code to be comfortably manageable with these tools?

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [November 25, 2018, 7:50pm UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/15 "2018-11-25T19:50:09Z")

</div>

> [@Tamas\_Papp](#):
>
> I think the most reasonable approach for a newcomer to Julia is to take a step back and re-evaluate their approach to debugging and programming style in general.

I understand that people who will write a debugger decided that other things have priority. I regret it but but ofc understand it. But insisting that a need of a debugger is an indication of a poor coding style is frankly annoying.

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [November 26, 2018, 1:51am UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/16 "2018-11-26T01:51:32Z")

</div>

> [@joa-quim](#):
>
> But insisting that a need of a debugger is an indication of a poor coding style is frankly annoying.

I really don’t think that’s what he meant. But, passions have been inflamed by this issue on this forum before. I think I speak for everyone when I say we don’t want to have _that_ argument again 😆

No one is judging you for wanting a debugger, I promise. Everyone recognizes that it would be really useful. But we don’t have one, so what’s a new user to do? As @Tamas_Papp said, there are ways to efficiently write really good code without a debugger and that’s worth learning.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [November 26, 2018, 1:56am UTC](https://discourse.julialang.org/t/breakpoint-atom-juno/17931/17 "2018-11-26T01:56:48Z")

</div>

> [@kevbonham](#):
>
> I think I speak for everyone when I say we don’t want to have _that_ argument again

I fully agree.
