For instructions on using your chosen debugger, consult the online help within the debugger or its documentation.
Always specify the -g option when compiling programs for debugging.