View Full Version : KDevelop debugger setup problem

7th August 2007, 15:15

I've installed KDevelop 3.4 on Ubuntu 7.04 to develop a Qt app.
If it's relevant, I installed Qt4.3 and no Qt3.
When I start the debug session from the IDE, I get an eror saying:

GDB cannot use the tty* or pty* devices.
Check the settings on /dev/tty* and /dev/pty*
As root you may need to "chmod ug+rw" tty* and pty* devices and/or add the user to the tty group using "usermod -G tty username".

I ran chmod and usermod scripts in a terminal window but I still get the same error.

Can anyone help me here ?

16th August 2007, 15:24
What does "ls -l /dev/{p,t}ty?" return?

10th September 2007, 09:03
Had more problems with ubuntu, so I installed Debian Etch instead. Seems much better. Still, debug doesn't work from the IDE, but does work directly (gdb from a console window).

In KDevelop, debug seems to attempt to work. When started,
I see a console window appears and disappears instantly.
The debug floating toolbar appears.
The breakpoints appear in the breakpoints tab and they're enabled.

Then the app appears to exit before it starts, or maybe doesn't actually start at all, (as I've placed a line of code early in a function to beep as an audible indication that the function did get called).

There's a message in the GDB tab:

/bin/sh -c /bin/sh /usr/bin/gdb /home/vince/projects/rocktown/src/src --interpreter=mi2 -quiet<font color="blue">(gdb) Process exited</font>

I've done a google for similar problems, and have read the KDevelop FAQ's more than once to see if I missed anything, but don't see anything obvious.

What could be wrong ??

11th September 2007, 13:56
What happens if you enter that line manually from within a terminal?

11th September 2007, 15:09
If you mean the line:

/bin/sh -c /bin/sh /usr/bin/gdb /home/vince/projects/rocktown/src/src --interpreter=mi2 -quiet

then all that happens is I get a sh session, prompt is:

11th September 2007, 15:50
So now you know why it doesn't work from within KDevelop as well ;)

Please open the project options dialog in KDevelop, go to "Debugger" tab and check what is written in the "Debugger executable" line edit.

12th September 2007, 06:56
So now you know why it doesn't work from within KDevelop as well ;)

Please open the project options dialog in KDevelop, go to "Debugger" tab and check what is written in the "Debugger executable" line edit.

Debugger executable is set to:

Debugger Shell is set to:

12th September 2007, 07:47
Debugger shell should be empty and debugger executable should be set to /usr/bin/gdb.

12th September 2007, 08:46
Thanks, debug is doing something now, although I can't seem to find where the Trace window is, app doesn't appear to stop on breakpoint, AND getting KDevelop errors when trying to watch variables.

Debugger error
Debugger reported the following error.
No symbol "myVariable" in current context.

I'll see if I can figure it out from here.

12th September 2007, 09:33
Make sure you compile in debug mode and that you have the debugger plugin activated for your project.

12th September 2007, 09:54
.pro file includes:
CONFIG += debug
CONFIG += qt debug
Debugger frontend is enabled in KDevelop Settings.

12th September 2007, 10:07
Did you enter this "myVariable" somewhere?

12th September 2007, 12:26
Yes, when debug is started, a "Variables" tab is added to the left of the IDE. I manually added it in that window and also by hilighting the variable in the source code window and add it from the popup menu. Both methods give the same result.

Although I deleted the watch entries, closed the project and re-built it, the same error dialog still pops up every time the variable is accessed in a debug session.

While the app is running, the Breakpoint icon in the source window is red.

Another odd thing, in the IDE Debug pulldown menu, the available options are:
Set Execution position to cursor

But these menu options are disabled:
Run to cursor
Step Over
Step over instruction
Step Into
Step Into Instruction
Step out

For what it's worth, the Shell window that opens doesn't seem to do anything. It's just a blank shell with no prompt, nothing gets sent to it.

Just now as I closed the running app, KDevelop debug dialog reported numerous error messages, all the same:
No registers

Then the debugger encountered an internal error reported by gdb, "Please submit a bug report".

17th September 2007, 01:13
ok,i also met the same proplems ,i donot know how to resolve them .anyone know where is some documents about using debugger in kdevelop ?my email honest581@yahoo.com.cn,
expect somebody give me some advice!
i have search forums in China,but there no answer,i think here i would like get something!