thanks for replies guys.
i am already aware of basic debugging using echo, print_r and wp_debug.
this is something advanced i am asking for.
i tried SublimeXdebug plugin but had hard time configuring it ( looks like it need to be updated )
hehe bro actually what you want ? If i understood your question properly then, i suppose you need to do unit testing for each module and sub module, it's actually TDD approach, so here you go here
Good luck !