Friday, July 4th 2008, 9:32pm UTC+1

You are not logged in.

  • Login
  • Register

1

Tuesday, December 5th 2006, 2:45pm

debug on KDevelop 3.2

hi !
i'm a newbie of KDevelop, i have a KDE/C++ project. i want to debug it.
i can start to debug (Debug --> Start), but i can't get any information i want such as variable values (number, string...)

anybody, help me !

regard !
nhatkhang
  • Go to the top of the page

2

Wednesday, December 6th 2006, 4:14am

RE: debug on KDevelop 3.2

hi.
i set breakpoints, start debugger. the debugger dose its mission very well.
but i can't get any normal information from it.

i can see which statement is currently carried on, the way the program executes.
but i don't know what the value of a particular variable is. nothing to show them.

i search in its IDE, there is a tab of debugger,GDB, it shows something like thread, used libraries,.... but those information dosen't help me to debug.

in VC++, i can get much more information i want.

i can't find any documents for kdevelop debugger.

can you show me how to debug or tell me where to find those docs ?

regard
nhatkhang
  • Go to the top of the page

wachman

Beginner

Posts: 5

Location: Lublin, Poland

3

Saturday, January 20th 2007, 4:39pm

RE: debug on KDevelop 3.2

I've got the same problem. Is there any tutorial or help file on how to debug Qt Applications using kdeveloper for newbies?
  • Go to the top of the page

DrMega

Beginner

Posts: 3

Location: UK

Occupation: Developer

4

Sunday, January 21st 2007, 9:06pm

RE: debug on KDevelop 3.2

I can't seem to get the de bugger to do anything. As I usually do when testing new stuff, I chose to keep it simple. Here is my C++ app in its entirety:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream>
#include <cstdlib>

using namespace std;

int main(int argc, char *argv[])
{
cout << "Hello, world!" << endl;
cout << "Hello again" << endl;

return EXIT_SUCCESS;
}

I set a breakpoint next to the second cout line, did a build and then said debug->Start. This gave me a message that 'Program exited normally'. What I hoped to see was the program start up, and then in the IDE execution would stop at the breakpoint and it would be clear what it was doing. It didn't happen.

I'm sure I'm missing something obvious. Any ideas?
  • Go to the top of the page

5

Monday, January 22nd 2007, 3:03pm

RE: debug on KDevelop 3.2

What informatuion are you looking for ?

If it is the watch and the stack details, then there are tabs in the Dockwidget that is placed at the bottom for these purposes. You will be able to find that Frame stack and the GDB tabs. Also in the Dock window placed at hte Right side, you will be able to find the watch

What more are you looking for ? Also there is a forum specifically for KDEvelop. You will get more help there .
  • Go to the top of the page

DrMega

Beginner

Posts: 3

Location: UK

Occupation: Developer

6

Monday, January 22nd 2007, 7:15pm

RE: debug on KDevelop 3.2

Quoted

Originally posted by sunil.thaha
What informatuion are you looking for ?


Some clue as to what I'm doing wrong, why the debugger doesn't step at the breakpoint I set.
  • Go to the top of the page

7

Monday, January 22nd 2007, 8:41pm

RE: debug on KDevelop 3.2

Probably because that break point is never met. Or maybe because you have not installed gdb. Why don't you try debugging a simple C++ program and see if the debugging really happens. Another thing that came to my mind was that you might be setting bookmarks ( F2 shortcut ) instead of Break point ( red in color ).
  • Go to the top of the page

DrMega

Beginner

Posts: 3

Location: UK

Occupation: Developer

8

Friday, January 26th 2007, 9:23pm

RE: debug on KDevelop 3.2

Quoted

Originally posted by sunil.thaha
Probably because that break point is never met. Or maybe because you have not installed gdb. Why don't you try debugging a simple C++ program and see if the debugging really happens. Another thing that came to my mind was that you might be setting bookmarks ( F2 shortcut ) instead of Break point ( red in color ).


The breakpoint would always be met. My test program couldn't get any simpler really (look at the code I posted in my original note). I'm not sure what gdb is (presumably its the linux standard debugger??) but I have since learned that there is a debugger installed on my machine because I've stopped using KDevelop in favour of Anjuta, which does most of what I need and the debugger worked exactly as I would have expected.
  • Go to the top of the page

9

Tuesday, March 27th 2007, 5:58pm

The problem is probably that the program was not compiled with debug information. In my qmake *.pro file, I added a CONFIG += debug, and kdevelop now works with breakpoints. It is a little deceiving that you use the debug menu to execute the program, but it may or may not actually have compiled the program with debug info.
  • Go to the top of the page

marquedios

Beginner

Posts: 2

Location: Dayton, Ohio

Occupation: Data Analyst

10

Friday, June 22nd 2007, 2:47am

Editing the <project name>.pro and adding the CONFIG += debug made KDevelop 3.4.0 running on KDE 3.5.6 crash. However if I edit the already existing CONFIG line:

CONFIG += warn_on \
qt \
thread

to read:

CONFIG += warn_on \
qt \
thread \
debug

Then editing the src\src.pro file and adding the line:

CONFIG += debug

Debugging works. I found though that using the same technique for the src.pro file as I did the <project name>.pro file also made KDevelop crash...

Also I noticed something funky while debugging my sample testing project and that is that after stepping over an instruction just before a call to qDebug() my debugger to ran off without me :(. I'll have to find out why it did that but adding another break point on that line made it step properly into the loop after words and onto the end.

I love KDevelop and honestly I was surprised to NOT see a build configuration dialog for a qmake project :(. Guess I'll have to learn the syntax of a .pro file. Oh well, such is life and you can't complain seeing as KDevelop is as good as it is :D.
  • Go to the top of the page

11

Friday, June 22nd 2007, 9:48am

There is a forum for KDevelop too. It would be helpful if you report bugs to them
  • Go to the top of the page

vieraci

Beginner

Posts: 3

Location: Darwin, Australia

Occupation: Technician

12

Wednesday, August 29th 2007, 6:36am

Quoted

Originally posted by marquedios
Editing the <project name>.pro and adding the CONFIG += debug made KDevelop 3.4.0 running on KDE 3.5.6 crash. However if I edit the already existing CONFIG line:

CONFIG += warn_on \
qt \
thread

to read:

CONFIG += warn_on \
qt \
thread \
debug

Then editing the src\src.pro file and adding the line:

CONFIG += debug

Debugging works. I found though that using the same technique for the src.pro file as I did the <project name>.pro file also made KDevelop crash...


What CONFIG file are yoiu talking about ?

I have put in my program a beep so I can hear if my program enters a certain function I'm trying to debug to see if it is in fact, being run, then if I run the app, I hear the beep. If I start the debugger, all I see is a console window flash for a split second and the program terminates. I don't hear a beep which tells me it didn't run to completion.
  • Go to the top of the page

marquedios

Beginner

Posts: 2

Location: Dayton, Ohio

Occupation: Data Analyst

13

Saturday, January 5th 2008, 2:03pm

There is a .pro file both in the root of your project and in the src folder. One should be called [Your Project Name].pro and the other should be (or at least for me) src.pro.
  • Go to the top of the page

Rate this thread