You can instruct XL C/C++ to include debugging information in your compiled objects by using different levels of the -g compiler option.
For details, see -g in XL C/C++ Compiler Reference.
The debugging information can be examined by dbx, the IBM® Debugger for AIX®, or any other symbolic debugger that supports the AIX XCOFF executable format to help you debug your programs.