# Interactive versus function wrapping

**URL:** <https://discourse.julialang.org/t/interactive-versus-function-wrapping/43036>\
**Category:** New to Julia\
**Created:** [July 14, 2020, 11:47am UTC](https://discourse.julialang.org/t/interactive-versus-function-wrapping/43036 "2020-07-14T11:47:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Post date:** [July 14, 2020, 11:47am UTC](https://discourse.julialang.org/t/interactive-versus-function-wrapping/43036/1 "2020-07-14T11:47:39Z")

</div>

Thanks to all of you, I am making substantial progress in my understanding of the Julia approach. Let us continue …

My modus operandi is to develop code interactively in an Atom Window (not the REPL) and execute a line at a time. When I get to the point where my code works, I wrap code up into functions, put them in a file that is included, and continue the process.

However, on occasion, I would like to run some of these functions a single line at a time for further analysis. What is the best way to approach this? Is using the `step` function of the interactive debugger the only way, or is there another approach to consider?

Thanks, Gordon.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [July 14, 2020, 11:59am UTC](https://discourse.julialang.org/t/interactive-versus-function-wrapping/43036/2 "2020-07-14T11:59:45Z")

</div>

In short, there are many options, both in theory, and in practice for the REPL without IDEs like Juno or VSCode or with them (also supporting the other less used IDEs?).

Those are the most used, while be aware about [GitHub - JunoLab/Juno.jl](https://github.com/JunoLab/Juno.jl)

> **Attention** : We have decided to join forces with the [Julia extension for VSCode](https://github.com/julia-vscode/julia-vscode). As such, this Atom-based plugin is effectively in “maintenance-only mode” and we expect to only work on bug fixes in the future.

FYI: old blog post: [A Julia interpreter and debugger](https://julialang.org/blog/2019/03/debuggers/)

There are many threads on debugging, most likely outdated, I’m just not sure as I do not use the debuggers:

> [@Improve debugger GUI to help adoption?](https://discourse.julialang.org/t/improve-debugger-gui-to-help-adoption/33708):
>
> Recently I’m promoting using Julia for our group’s next project. For context, we are choosing between Python and Julia for numerical simulations and prototype modeling. I advertised Julia’s speed, and did casual demos for some language features as well as the Juno IDE. One interesting observation is, I’m mostly worried about resistance to adoption coming from the following directions: (1) JIT compilation is slow leading to slow 1st time execution (the famous “time to first plot” issue). (2) S…

The Rebugger (not a typo) sound cool though. There is support in Julia 1.5 for time-traveling bug reports, so I foresee a future where the debugged can go back in time, not just step forward, if not done already. Then in VSCode.

---

<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:** [July 15, 2020, 5:33am UTC](https://discourse.julialang.org/t/interactive-versus-function-wrapping/43036/3 "2020-07-15T05:33:57Z")

</div>

> [@erlebach](#):
>
> on occasion, I would like to run some of these functions a single line at a time for further analysis. What is the best way to approach this?

While this is a common approach in some languages, I would recommend that you don’t do this, and write short, simple functions instead. It takes some time getting used to this and giving up long, monolithic functions, but IMO it’s the best approach to organizing code in Julia.

Then you have debuggers, but a simple `@show` will serve just as well most of the time.
