LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2004, 03:33 PM   #1
vasanthraghavan
Member
 
Registered: Mar 2004
Location: USA
Distribution: Redhat Linux 9
Posts: 98

Rep: Reputation: 15
howto use kdevelop to develop and debug a console program


Hi,
could someone in this forum explain me in detail the steps needed to build and debug a simple console application in C using the kdevelop environment?
The following C program can be used as an example:

/* test.c */
main()
{
printf("Hello world\n");
return 0;
}

What is the procedure in kdevelop to get this file in the kdevelop environment, into a new project, perform a build etc and set up a break point and then starting the debugger - gdb?
Thank you.
 
Old 05-12-2004, 11:00 PM   #2
kooch
Member
 
Registered: Mar 2004
Location: Upstate NY
Distribution: Slackware/YDL
Posts: 77

Rep: Reputation: 15
Create a project: Project->New Project->C->Simple Hello world
to build: Build->Build Project
To execute: Build->Execute Program
To set a breakpoint: Open source file right click on statement to break on and select 'Toggle Breakpoint'
To debug: Debug->Start

That's what I figured out in less than two minutes of playing.
 
Old 05-13-2004, 03:24 PM   #3
vasanthraghavan
Member
 
Registered: Mar 2004
Location: USA
Distribution: Redhat Linux 9
Posts: 98

Original Poster
Rep: Reputation: 15
Hi,
got the debugger running.
some questions:
After setting the break point and running the program, how do we know the current execution is just waiting before the break point - visually?
Also as we (debug) step through the code, is there a way to visually see where the current execution is? (like a colored line in the source code indicating the line of code in execution).
Thank you.
 
Old 05-13-2004, 04:22 PM   #4
kooch
Member
 
Registered: Mar 2004
Location: Upstate NY
Distribution: Slackware/YDL
Posts: 77

Rep: Reputation: 15
Ok this is the last time I answer a question that takes looking in a menu or two to figure out:
To show breakpoints and current execution point: View->Show Icon Border
or F6

Sorry to sound pissy but...Maybe _try_ and find the answer yourself next time. The first time I used KDevelop was last night when you asked, I am now at a total of 3 or so minutes of use.
 
Old 05-13-2004, 05:10 PM   #5
vasanthraghavan
Member
 
Registered: Mar 2004
Location: USA
Distribution: Redhat Linux 9
Posts: 98

Original Poster
Rep: Reputation: 15
Hi,
Actually my own search in kdevelop could not yield answers. This was the reason for my posting in the forum. But in anycase my apologies for asking the question. My kdevelop version is 2.1.5. However the option you specified under View->Show Icon Border is not there in my menu.
Thank you.
 
Old 05-15-2004, 12:23 AM   #6
vasanthraghavan
Member
 
Registered: Mar 2004
Location: USA
Distribution: Redhat Linux 9
Posts: 98

Original Poster
Rep: Reputation: 15
hi kooch,
got the debugger problem resolved. somehow Kdevelop was not putting out the symbolics for the debugger to pick up. after setting the options (-g) in the project for gcc, doing autoconf, running 'configure', and then running make, proper executable was generated for the program! now it works great!
Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KDevelop effective debug marios_auth Programming 1 04-13-2005 07:41 AM
Cant debug with kdevelop sibtay Programming 2 09-26-2004 10:29 AM
Can't enter input using debug in Kdevelop Alan Wright Programming 0 06-17-2004 04:03 PM
KDevelop won't debug c0d1f1ed Programming 3 03-17-2004 07:05 AM
How can I develop the audio program in linux? fliny Programming 3 10-03-2003 07:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration