Debugging with KDevelop

Andreas Pakulat apaku at gmx.de
Sun Oct 23 22:59:05 UTC 2005


On 23.10.05 10:50:31, Francesco Montorsi wrote:
> 1) You cannot define any "expansion rule": I use everywhere wxString object 
> types which
> are the wxWidgets' strings. I just cannot see their contents unless I add as 
> watch
> expression: (char*)str.m_pchData, or unless I expand all the times the variable 
> tree clicking on the variable until I reach the parent class and I can finally 
> expand its m_pchData variable manually.
> (also, when using Unicode, I cannot see string contents expanding the variables 
> in the tree; probably because "wxChar" is mapped to "wchar_t" instead of 
> "char"...).
> 
> This is a big loss of time when you have to inspect many variables. In MSVC6 
> there is the AUTOEXP.DAT file where you can define simple expansion rules. IMHO 
> this feature would make the use of debugger 10/20 times faster.

kdevelop actually has no debugger of it's own, it's "only" a nice UI
around the gdb. And gdb has a way of storing expansions and macros: the
file .gdbinit in your home directory. Unfortunately the gdb launched
from within kdevelop doesn't read this file (I have no idea why)...

There is a standalone KDE UI to gdb, called kdbg, that does read
.gdbinit. But it's not integrated with kdevelop and you have to
specifically open all source files you want to set breakpoints in.
 
> 2) You cannot see the return values of the functions. This is a bit problematic 
> specially when the returned value is used directly in other expressions, 
> without storing it in a variable...

Hmm, MSVC6 does allow this? I didn't even see this in Java IDE's and
thus thought that it's pretty hard to do it. On the other hand I haven't
thoroughly searched for. Anyway, if the return value of one function is
used as argument into another, you only have to step into the "outer"
function and can see the value from the argument.

> I really would like to help on implementing these features. Unfortunately I've 
> never used Qt and it would probably take a lot of time to me to learn...

Yes it does, kdevelop is quite complex even though it is has relatively
clean design (just my personal experience).

Andreas

-- 
You have an ambitious nature and may make a name for yourself.




More information about the KDevelop-devel mailing list