Debugging with KDevelop

Sascha Cunz sascha at kdevelop.org
Sun Oct 23 22:30:07 UTC 2005


Hi,
On Sunday 23 October 2005 10:50, Francesco Montorsi wrote:
>      I'm new to this list so I hope this is the right place to discuss this
> issue ;)
Feel welcome ;)

> I've just switched from MSWinXP to FC4 and since I've used MSVC6 for a lot
> of years I was very happy to find a program like KDevelop with a lot of
> features that were missing from MSVC6... and all of this for free ! good
> work !

That's a good starting point :-)

> However I have a big problem with KDevelop (3.2.0): the debugger.
> I tried to use it, I read the manual, I googled but I cannot find any
> workaround to make the debugger easier to use: the main function of a
> debugger is to inspect code and let the developer find the bugs.
> Unfortunately the most powerful tool to inspect code, the variable tree
> window, is much more difficult/annoying to use than, for example, MSVC6's
> one.

Total agreement from my POV.

> 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.

Here you really have a point! Just for the records: They dropped it (or i 
didn't find it yet) in the .NET version of MSVC - which i personally feel is 
a pitty, because this is really a rocking feature.

Maybe Vladimir can have a look, if it's posible to solve this. However, 
autoexp.dat always seemed a little mystic to me, if we can implement the 
backend, we should also implement a nice frontend to it.

> 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...

I've no clue if that is posible with GDB at all, but maybe Vladimir can 
enlighten us here.

> 3) To make stepping a little easier, it would be nice (but this has low
> priority, IMHO) to give to the user a way to select (maybe using regexp)
> the functions where he *never* wants to step into so that if he uses
> Step-into over one of those functions (maybe just because there are a lot
> of them and he pressed the wrong key :-)) the debugger instead just does a
> Step-Over.

This one would really be a good feature. No IDE i've seen up to now supports 
this. Though it could reduce debugging time a lot.

> IMO these features would definitevely patch the last area where KDevelop is
> inferior to MSVC ;)
> I know various programmers (in wx community specially, where we all do
> cross-platform programming) who fear to switch from Win->Linux because they
> are convinced that there are no IDEs with a debugger as powerful as MSVC's
> one...
>
> 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...

Well, learning Qt isn't at hard as it might sound. I've seen a lot of people 
that actually compare developing C++ with Qt to developing in Microsoft 
Visual Basic.

> Thanks indeed & keep up the good work,
> Francesco Montorsi

-- 
Sascha Cunz          sascha at kdevelop.org
KDevelop Developer   http://www.kdevelop.org




More information about the KDevelop-devel mailing list