See these topics:
Introduction to the Intel® Debugger (idb)
Preparing Your Program for Debugging
Using idb Debugger Commands and Setting Breakpoints
Summary of idb Debugger Commands
Debugging the SQUARES Example Program
Displaying Variables in the Debugger
Expressions in Debugger Commands
Debugging Mixed-Language Programs