Ubuntu – how to run and debug bash script from VSCode

bashvisual-studio-code

How do I run and debug bash script from VSCode. I have this setup in my Ubuntu machine. Is there any way to configure so that when I say run it execute the bash script?

I did install the bash debug extension but I get this error

rogalmic.bash-debug-0.3.7/bashdb_dir/command/source.sh: line 41:
/dev/stdin: No such device or address

Best Answer

Bash Code

From the run option in your integrated terminal, change the option to be the shell type you want to run your code in.

You can create multiple terminals open to different locations and easily navigate between them. Terminal instances can be added by clicking the plus icon on the top-right of the TERMINAL panel or by triggering the Ctrl+Shift+` command. This action creates another entry in the drop-down list that can be used to switch between them.

More information on the integrated terminals here.