You can use a symbolic debugger to debug applications compiled with XL C/C++.
Specifying the -g or -qlinedebug compiler options at compile time instructs the XL C/C++ compiler to include debugging information in compiled output. For more information 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.