#!/usr/bin/env bash
is superior to #!/bin/bash
since the former will use the first version of bash found on the system path which is necessary if the user has updated bash like I did on macOS (I needed to update >v4 to get debugging in VSCode).
Comparing the default installed bash version (3.2) with the newly installed one (5.2)
To see the full path to the binary being used we can do
readlink -f $(which bash)
Investigating the symlink path shows the homebrew installed location of the binary, upgraded to 5.2.26.