# Debugging Julia script on SSH connection (no GUI)

**URL:** <https://discourse.julialang.org/t/debugging-julia-script-on-ssh-connection-no-gui/96284>\
**Category:** Tooling\
**Tags:** question, package, debugging\
**Created:** [March 18, 2023, 8:41pm UTC](https://discourse.julialang.org/t/debugging-julia-script-on-ssh-connection-no-gui/96284 "2023-03-18T20:41:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![iabraham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iabraham/32/36532_2.png) [@iabraham](https://discourse.julialang.org/u/iabraham)\
**Post date:** [March 18, 2023, 8:41pm UTC](https://discourse.julialang.org/t/debugging-julia-script-on-ssh-connection-no-gui/96284/1 "2023-03-18T20:41:03Z")

</div>

Is there anything remotely like/similar to [pudb](https://github.com/inducer/pudb) for Julia? It is easily one of my favorite ways to debug code when logged into a HPC/cluster node without GUI or X window forwarding.

The _TUI_ approach performs extremely well over limited bandwidth and the package itself is very small & lightweight that can be `pip` installed very easily. Moreover you can watch the call stack, interactively view the workspace variables, keep an eye on breakpoints, set how you want to see variables, switch between the debug/normal REPL etc. all without a GUI interface requiring X window forwarding. In terms of ease of usage, `pudb` is couple of orders magnitude improvement over `pdb`.

I was looking for something similar in Julia and it looks to me like there is currently no such package. Does anyone know of something similar? May VIM or Emacs based?

If not … what is the most Julian way to debug code in the absence of Juno/VSCode etc. _in 2023_ (i.e. _not_ the pdb style which is what Debugger seems to emulate).

---

<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:** [March 18, 2023, 8:48pm UTC](https://discourse.julialang.org/t/debugging-julia-script-on-ssh-connection-no-gui/96284/2 "2023-03-18T20:48:57Z")

</div>

There is this keyboard-controlled [GitHub - JuliaDebug/Debugger.jl: Julia debugger](https://github.com/JuliaDebug/Debugger.jl) that should be good enough.

I think it’s actually part of VS Code (at least previously Juno), but then some add-on makes it a GUI version, but I’m not aware of any TUI version or it or any debugger.

There’s also Infiltrator.jl that I found to me nice. And I just noticed brand-new:

> **[GitHub - FedeClaudi/HelpGPT.jl: Let the AI fix your mistakes.](https://github.com/FedeClaudi/HelpGPT.jl)**
>
> Let the AI fix your mistakes. Contribute to FedeClaudi/HelpGPT.jl development by creating an account on GitHub.

I don’t know how well it works. Since the GPT-4 upgrade to ChatGPT hopefully it works even better for Julia, same as for for other languages; often you can just copy-paste an error message to it in case it generated bad code, and that’s enough to get a fix. Or so they say, for Python if I recall.

There are also many tools that can help with code, e.g. for formatting and linters and:

> [@\[ANN\] New tools for fixing performance problems in Julia](https://discourse.julialang.org/t/ann-new-tools-for-fixing-performance-problems-in-julia/95773):
>
> Many questions on discourse center around performance, and one common category of problems is “type instability” (aka, poor inferrability triggering runtime dispatch). While the @code\_typed and similar macros are powerful, they can be somewhat daunting for newcomers and, for some functions, rather verbose and thus a lot to wade through even for experienced Julia developers. We just released [Cthulhu 2.8](https://github.com/JuliaDebug/Cthulhu.jl), which we hope may simplify this kind of analysis. Some of you may know Cthulhu as an amazing…

[GitHub - tonyhffong/Lint.jl: A lint tool for Julia code](https://github.com/tonyhffong/Lint.jl) StaticLint.jl

---

<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:** [March 18, 2023, 9:39pm UTC](https://discourse.julialang.org/t/debugging-julia-script-on-ssh-connection-no-gui/96284/3 "2023-03-18T21:39:18Z")

</div>

I’ve never used pdb, but from browsing the docs it does not seem as usable (and pretty) as Debugger.jl:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/f/4fe1f1743685985d6847233e3980c4221896f035.png)

It doesn’t give you the GUI-like experience of pudb, but you can do all the things you describe with a more manual interface.

---

<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:** [March 18, 2023, 9:47pm UTC](https://discourse.julialang.org/t/debugging-julia-script-on-ssh-connection-no-gui/96284/4 "2023-03-18T21:47:41Z")

</div>

Two other things to point out:

- you can edit, run, and debug code remotely with VSCode: [Visual Studio Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
- while it’s not officially a debugger, I find that Revise remains my favorite way of debugging: I typically find it more efficient to just insert `@show` statements in my code and run it again in the same REPL session, time and time again. Revise makes that very painless. I’m far from a Python expert, but my understanding is that it’s a better experience than comparable Python packages, so if you’ve not tried this you should give it a chance.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [March 19, 2023, 4:44am UTC](https://discourse.julialang.org/t/debugging-julia-script-on-ssh-connection-no-gui/96284/5 "2023-03-19T04:44:29Z")

</div>

My thought - what is stopping you having a GUI?  
If using Windows have you tried using Mobaxterm - that gives you all sorts of graphical clients plus sets up a X server on your laptop,  
You can also do all sorts of funky tunneling and proxy setups once you have an ssh connection.
