2

I need to step through this program, but the icons related to debugging are greyed out, even if I set the configuration to 'debug'. Any idea how this is supposed to work?

#include <stdio.h>

int main( void )
{
  int number = 7;

  printf ( "%d", number % 2 );
  number = number / 2;
  printf ( "%d", number % 2 );
  number = number / 2;
  printf ( "%d", number % 2 );
  number = number / 2;

  printf ( "\n" );

  return 0;
}

OS: Fedora 20

Debugger gdb

I created a general C project (minimal)

1 Answers1

0

Found out how to do it:

At least there needs to be a Makefile which can be used by gdb. The one created by Anjuta when creating a new C Makefile project can be used as basis. Also, gdb needs to be enabled in the settings window.

1.Click "Add breakpoint" in the toolbar 2.Execute > Debug program

Then the buttons become sensitive and you can step trough the code