# How do you use debuggers?

**URL:** <https://discourse.julialang.org/t/how-do-you-use-debuggers/4580>\
**Category:** Community\
**Created:** [July 1, 2017, 6:41am UTC](https://discourse.julialang.org/t/how-do-you-use-debuggers/4580 "2017-07-01T06:41:52Z")\
**Posts on this page:** 1\
**Showing post:** 103

<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:** [April 15, 2018, 7:27am UTC](https://discourse.julialang.org/t/how-do-you-use-debuggers/4580/103 "2018-04-15T07:27:37Z")

</div>

> [@glemieux](#):
>
> being able to ‘inspect’ the code through a debugger is extremely helpful

I don’t disagree, but I have come to recognize the need for a debugger as a sign of code smell in Julia. Ideally, well-written Julia code consists of small functions that do one thing, and can be unit tested as building blocks of a larger solution.

I agree that one does not always control the quality of other’s code, and a debugger is _occasionally_ useful. But I also think that scientists without a lot of programming experience

1. have a bias towards large monolithic functions,
2. tend not to be aware of the existence of unit tests,
3. instead, the approach is “when it errors, we use a debugger”.

So when I see something that would require a debugger to, er, debug, I have an itch to refactor the whole thing. Or rewrite it from scratch. Otherwise, I can’t trust the quality of that piece of code, so it is worse than useless.

That said, what I would find really useful is as an interim solution is the ability to [inspect function arguments in a stack trace](https://discourse.julialang.org/t/getting-a-stack-trace-with-function-argument-values/529/).

---

_[View the full topic](https://discourse.julialang.org/t/how-do-you-use-debuggers/4580)._
