I do sort of single stepping by opening the shell script in a text editor in one window and have the terminal open in another window side by side. Then I drag & drop the script line by line into the terminal. The trick is to select and drop the line break as well, so you won't need to switch to the teminal only for pressing return/enter there.Is there any way to single step through a shell script, or even set breakpoints?
It would be nice if, in addition to '-x' there was something like a '-p' for pause after each command in a shell script.You set a breakpoint in a script by editing it, insertingread foo
where needed.
As for single stepping, I never needed it sinceset -x
is a very nice shell script x-ray machine.
I'm just getting used to emacs but have it handy in providing a means of opening two windows where you can be editing a script in one window and running it in a shell in the other.I do sort of single stepping by opening the shell script in a text editor in one window and have the terminal open in another window side by side. Then I drag & drop the script line by line into the terminal. The trick is to select and drop the line break as well, so you won't need to switch to the teminal only for pressing return/enter there.