gdb

GNU debugger for inspecting and debugging compiled programs

brewmacoslinux
Try with needOr install directly
Source

About

GNU debugger

Commands

gdb

Examples

Start debugging a compiled executable$ gdb ./my_program
Debug a running process by PID$ gdb -p 1234
Run program with arguments and set breakpoint at main$ gdb -ex 'break main' -ex 'run arg1 arg2' ./my_program