How to live debug android device

Hi,
I am trying to live debug android device just like Win32. Basically I want to test C++ code. Any advice would be appreciated.
Thanks