I was able to setup a debugger using a launch mode using Visual Studio Code with the Bash Debug extension. Is it possible to setup the debugger in VSCode to be able to debug a bash script using a attach debug mode?
For debugging scripts on the host machine and scripts inside a docker container?
This seems like a VS Code question. Maybe it’s possible. Have you tried using dev containers? It wouldn’t surprise me if VSCode installed a debugging server in the container and talked to it in order to run scripts and hook into them.
Which extension are you using?
https://marketplace.visualstudio.com/items?itemName=rogalmic.bash-debug
This is the extension I am using.
You can look at the code (it’s open source), but the extension seems unmaintained and local only. It only launches the debugger locally and communicates with the debugger per socket with a random name. The extension itself would have to be modified…