BashSupport Pro: Debugger support

A debugger for Shell scripts is long overdue.

Most likely this will be quite complicated to implement. There’s BashDB, which sounds interesting to implement this.

The debugger has to work across all supported operating systems (macOS, Windows, Linux). There are many different target environments, which need to be supported. For example, it has to work with Bash 3, 4, and 5 and possibly variants of Bash.

What do you think?

Which functionality must be part of a Bash debugger?

Just started using bashdb yesterday, and I found it to be very useful. My use was simple: ran it in a terminal to step through a script to locate an odd problem with reading a delimited set of values into an array. As it turns out, I may have uncovered a bug in bashdb, or an issue with bashdb running against Bash 5.0 while executing a script with a shebang set to a Bash 3.2 binary.

Anyway, a bashdb integration makes sense. If that’s not possible, then feature parity with bashdb would be great.

Thanks for your thoughts on this!
It’s most likely going to be an integration of bashdb. bashdb has grown over more than a decade, reimplementing this would add a lot of friction. I have to make sure about the inclusion of gpl2’ed software but as far as I can tell this should be fine as long as I publish my changes to it.

Which features of bashdb are you using the most?

I’m actively working on a bashdb integration. Most features (step over, step into, step out, stack info, variables list, basic support for expression evaluation) are working. But there’s still a lot left to do to make this work well on Linux, macOS and Windows and to add missing features like watches, temporary breakpoints, etc.
I can’t promise yet that this will work for all versions of Bash 3.x to 5.x, but it will definitely work with Bash 5.x.

I’d be happy to hear if there’s something else needed for bashdb integration.

Here’s a very early preview:

That looks great! What is the current status?

@ddnexus thanks!
I’m still working on this. There are many smaller issues to solve to offer a fully-featured debugger integration. In the meantime I’ve added support for watches, temporary breakpoints, breakpoint conditions, stack arguments, display of indexed array variables, display of associative array variables, and more. I still need to fix a few things in bashdb and push my upstream upstream to bashdb.

Major features which still need to be implemented are full support for Windows and macOS, compatibility with Bash 4 and possibly older versions and a few more things.

And I need to make my mind up about the release. JetBrains’s Shell plugin is lacking a lot of features and I won’t be able to add all of these for the initial version. I don’t want to force users, who’d like the debugger, to switch to an incomplete shell development environment.
I could make BashSupport Pro compatible to both JetBrains Shell and BashSupport. But this might be confusing and at some point in the future users of BashSupport need to switch.

I’m sure they can wait :smiling_imp:

Some more details and a new screenshot at . Make sure to read the last paragraph :wink: