You can use a symbolic debugger to debug applications compiled with XL C/C++.
At compile time, you can use the -g or -qlinedebug option to instruct the XL C/C++ compiler to include debugging information in compiled output. For -g, you can also use different levels to balance between debug capability and compiler optimization. For more information about the debugging options, see Error checking and debugging.
You can then use dbx, the IBM® Debugger for AIX®, or any other symbolic debugger that supports the AIX XCOFF executable format to step through and inspect the behavior of your compiled application.
Optimized applications pose special challenges when debugging. When debugging highly optimized applications, you should consider using the -qoptdebug compiler option. For more information about optimizing your code, see Optimizing your applications.