<div dir="ltr"><div><div>Visual Studio Code (VSCode) is an open source editor based on electron and nodejs.<br></div>It is probably the best open source editor available, with wide support by many, many projects.<br></div><div>It works equally well on Linux, Windows and MacOS. I use it routinely on all three platforms.<br></div><div>One such project is the Bash Debugger Project and is a great way to get started.</div><div><br></div><div>This is a quick start guide:<br><br></div><div>Install VSCode: <a href="https://code.visualstudio.com/Download">https://code.visualstudio.com/Download</a></div><div>Click on the 4 box icon at the left (the top left box is raised away from the other three).</div><div>Use the Search box at the top of the list of extensions list to find:</div><div>(I also just discovered Bash Extension, which installs all three plus more).<br>    Bash Debug<br></div><div>You might also want to install:<br></div><div>    Bash Beautify<br></div><div>    Bash IDE</div><div>    sudo apt install python-is-python3  # My version of Linux has only version 3 installed.</div><div> <br></div><div>IMPORTANT: Exit VSCode!<br><br></div><div>Create a directory somewhere using your shell and then cd to it and type:<br></div><div>    code .<br><br></div><div>Click the "explorer" button at the top left (looks like two sheets of paper).<br></div><div>Now move your mouse near the name of the directory and click the new file button...<br></div><div>Create a file.<br></div><div>#!/bin/bash<br></div><div>for f in /proc/*; do</div><div>   echo $f<br></div><div>done<br></div><div><div><div><br></div><div>If you installed Bash Beautify you'll see it with syntax coloring.<br></div><div>To the left of line 3 single click twice (pause between)... this will set a breakpoint.</div><div>A red "led" will appear there.</div><div><br></div><div>From the "Run" menu select "Add Configuration..."</div><div>Choose "Bash Debug".<br></div><div>You'll be placed into the file "launch.json".<br></div><div>Switch back to your bash file.<br></div><div>From "Run" menu select "Start Debugging".<br></div><div>You'll stop at first line of code.<br></div><div>Select "continue" from debug controls at top.<br></div><div>You'll stop at line 3.<br></div><div>Hover over "$f"... you'll see it's value.<br></div><div>Add $f in the watch expressions at the left.<br></div><div>Hit "continue" a few times.<br><br></div><div>By now, you'll have a good idea of how the debugging works.<br></div><div>Hit the red square button to stop debugging.<br><br></div><div><br></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>Brian</div><div> <br></div></div></div></div></div></div></div></div></div></div></div></div></div>