Now go grab bashdb for debugging bash on Visual Studio Code

Strangely by default, the bash debugger or bashdb is not part of the build, so apt installs are out.

Therefore we need to spend some time to get bashdb up and and working.   

We will need 3 components or the bashdb deb package will complain bitterly that libreadline6 and multiarch-support are missing and refuse to budge.

To solve this problem, we need to install bashdb from the deb packages manually.  Go the following websites to download the deb install packages for the following;

https://packages.debian.org/jessie/amd64/libreadline6/download

https://packages.debian.org/jessie/amd64/multiarch-support/download

https://ubuntu.pkgs.org/16.04/ubuntu-universe-amd64/bashdb_4.3.0.91+ds-4_amd64.deb.html

To install, su to root and type dpkg -i <deb-package-name> to install the 2 required libraries before installing bashdb.

Next fire up the Visual Studio Code that is pre-installed on Parrot OS, for some strange reason, Visual Studio Code is given a strange name in Parrot OS.

 


In Visual Studio Code, click the plugin button and type bash debug. You will need to click on the green Install button if the plugin is not installed.

Now you will have a easy way to debug bash scripts on the fly, a big boost for visually inclined folks.

For example, in the screen capture below, we have a sample script test.sh in the work space, click Run (the button with the bug) and select Bash-Debug.  

To the right of the Welcome panel, we have the debug pane.  It has buttons that allows you to step over, step in and restart debugging your script in Visual Studio Code.  

Now you get the see the variables change in real time when you step through the script!

Nice work so far!




Comments

Popular posts from this blog

Learning C/C++ and Assembly may be the best thing for Offensive Security

Doing Something That F5 Should Have Done Long Ago