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. |
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. |
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. |
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. |
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. |
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. |
All times are GMT -5. The time now is 07:04 AM. |