The following example is made with Eclipse Mars, Cygwin, gcc and gdb. However, the same applies to all other compilers and environments, too.
This options can be found under Run->Debug Configurations... or click on the arrow next to the green spider.