How to compile or debug line by line in shell script?

I know about bash -x, set -x and -v but disappears from Command Line Interface in fraction of second ......

I am looking for a command or script ..complies each line and shows the output after executing each line ....( similar what we have in C )

Thanks in Advance

One sloution to have something like this is to copy code fragment by code fragment or line by line and paste it in an interactive shell and see result .
But in my humble experience this won't fit for any kind of code design it fits for top down approach if your code contains a lot of jumping then this won't work

BASH Debugger