I would like bash/sh debugger tool, in CLI or GUI that:

  • shows variables in use.
  • show line of the code in execution
  • allow breakpoints
  • For unix systems

Some options I tried without success:

  • /bin/bash -x
  • ddd - is dead and doesn't work properly
  • Visualstudio - for windows
  • shellcheck - excellent tool for check code, but not for debug.
  • How to debug a bash script? – Alex Apr 1 at 22:23
  • 1
    I saw that post and tryed all of options there. None of them have what I want (maybe eclipse, that I tryied but couldn't make it work). All of them are good tools for debugging but not with the features that I listed. Resuming, I want to know if there is a tool like pycharm for debug. – Octavius Apr 2 at 0:45
  • 1
    the vscode one (not visual studio) seems to have the features you're looking for, step by step interactive debugging and variables values (there) – Alex Apr 2 at 8:04
  • @Alex Thanks! Is exactly what I was looking for! Please, can you put this comment as an answer? Then I can choose you answer. – Octavius Apr 2 at 15:07

Try Visual Studio Code with the Bash Debug extension

Visual Studio Code with the Bash Debug extension in action

I have used it just once or twice yet, so I can't say much about how well it works, but it ticks all your boxes.

  • Shows used variables in the side pane
  • Highlights currently executed line
  • Supports breakpoints
  • Runs on Mac and Linux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.