Debugging a C program using gcc

Asked by munir on 2009-09-06

With a C compiler in windows we can debug
a program using F7.
We can add watches and see value of variables
at each step the program executes.

Is it possible to do such thing in gcc 4.3 compiler in ubuntu?

I compile a file by the command "gcc filename.c -o outputfile"
When there are errors ,in terminal, it shows the line number where the error occurred.
Is there any way to directly go to the place where error occurred in the text file where the code was written?

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
Siyan Panayotov (xsisqox) said : #1

A powerful debugger is GNU Debuger ( ).
You may wish to use Nemiver ( ) wich is a graphical debugger, that uses GNU Debuger as a backend.

Steve McInerney (spm) said : #2

Sounds as though you're confusing the actual compiler vs an integrated development environment.

There are a range of IDE's available for working with C, I personally use Eclipse with CDT for C coding.
I suggest searching for 'ide' packages in the 'Development' section and trialling those to find one you prefer.

Can you help with this problem?

Provide an answer of your own, or ask munir for more information if necessary.

To post a message you must log in.