Tried to use emacs lisp debugging feature in emacs.
It's very simple. Just "edebug-defun" pointing to a function definition, and you can trace the function when evaluated.
Call the function, then set breakpoints at S-expressions with "b", then "f" to run. When an S-expression with a breakpoint is evaluated, the execution pauses. "f" to continue again. "G" to ignore all the breakpoint and finish up the execution. "q" to exit and go to top level at once.
There are more commands for this debugging feature, but for me these commands are enough to get started with debugging small elisp function. I'll look into other commands.