Debugging with KDevelop

Vladimir Prus ghost at cs.msu.su
Mon Oct 24 11:38:03 UTC 2005


On Monday 24 October 2005 13:24, Jakob Petsovits wrote:
> On Sunday 23 October 2005 10:50, Francesco Montorsi wrote:
> > 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.
>
> May I join in with debugger wishes?
>
> 1) Appearance: Hide the "watched variables" entry if no variables are
> watched. 

What about filing a wish? I know this is a simple thing but I'll sure forget 
it by the time I'll have the time.

> I have the variable view on the bottom edge of the KDevelop 
> window, and it takes ridiculous much space (two parent items, "Expression
> to watch" needing two lines while being wide as can be - obviously this was
> only designed as left-edge view) so there is maybe space for 3 variables
> where 5 or 6 should fit in. 

Take a look at http://zigzag.cs.msu.su/~ghost/kdevelop3.3/variables_window.png
(KDevelop 3.3 snapshot). There's no "Expression to watch" label at all.

> Also, could you please auto-expand the local 
> variables item 

It's auto-expanded.

> 2) Behaviour: When stepping and returning from a function, KDevelop
> respectively gdb immediately advance to the next executed statement.
> VC++ on the other hand inserts one do-nothing step where it just gets the
> highlight back to the originally called function. This is great, as you can
> for example have a function call like
> do( bee(), dooah() );
> and you want to step down into dooah(). With the current approach, you have
> to get to the last line of bee() and press the step down key there,
> otherwise you step on to the line after do(). With the VC++ approach, you'd
> get the do() line highlighted again and can select there if you want to
> step down again or step over this line.

I don't quite understand this. If you select "step out" while inside "bee" you 
should return to the "do" line.

> Don't know if it's possible to do that with gdb, though.
> Also, I currently can't test the debugger because there's a mysterious Qt
> statement saying
> "Qt: gdb: -nograb added to command-line options.
>  Use the -dograb option to enforce grabbing."
> but that still doesn't enable the variable view or such.
> I don't know where it's coming from, because it worked before.

You seem to be running kdevelop under gdb. 

- Volodya




More information about the KDevelop-devel mailing list