How to Debug Bash with VS Code

Summary

Basic

Spec

Instruction

MacOS

brew install bash

Linux(Ubuntu 20.04)

no additional installation

Windows

debugging executable file

launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Bash-Debug (hardcoded script name)",
      "type": "bashdb",
      "request": "launch",
      "program": "${workspaceRoot}/bubbleSort.sh",
      "commandLineArguments": "4 3 2 1"
    }
  ]
}