Re: [Qt-creator] how to attach sources for debugging?

2010-05-22 Thread Andre Poenitz
On Fri, May 21, 2010 at 11:05:11PM +0300, Aekold Helbrass wrote:
 I am using NetBeans (Java) for my everyday work, so I'll describe it
 as example:
 
 Let's assume our line of code looks like this:
 painter.drawText(getX(), getY(), getString());
 
 When you're pressing step into in NetBeans it highlights all step
 into possibities, four of them in example above, and highlights one of
 them as default one, so you can press step into once again to go into
 default one or you can click with your mouse on any other to step into
 it. Then, when you're stepped all your way up to the end of getX() for
 example you're returned to the same line, with one function marked as
 visited, and you can step into another one.

But that's debugging Java, not C++?

For a fair comparison you would have to compare NetBeans for C++ with Qt
Creator, and given that it uses gdb as backend I strongly doubt the 
functionality you describe exists there.

We are more or less restricted to what the debugging backend (gdb in
this case) provides, and gdb does not have such 'list all function calls
in this line' kind of capability.

When I think about it. We could try to use information from the code
model and temporary breakpoints to simulate this. I guess we will run
into interesting behaviour for inlined code, though. Maybe it's still
worth a shot.
 
 In QtCreator it steps in the first one to execute (getX() in our
 case), and when you're stepping over the internals of function up to
 the end - Qt Creator will not show you the original line again with
 possibility to step into next function but will act as step over it.

I know this is unfortunate, but again, there's no way to know in advance
whether a 'step over' will leave the current function or not, so there
is not much choice except to provide a separate command to specifically
step out of a function (Shift-F11).

 So it took me some time to understand that I should press step into

[Rather step out...]

 on the last lines of getX() to step into getY(), but I can't just skip
 them and step directly into drawText().

Yes, it would be seven keystrokes in this case.

Andre'
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-22 Thread Aekold Helbrass
On Sat, May 22, 2010 at 12:40 PM, Andre Poenitz
andre.poen...@mathematik.tu-chemnitz.de wrote:
 On Fri, May 21, 2010 at 11:05:11PM +0300, Aekold Helbrass wrote:
 I am using NetBeans (Java) for my everyday work, so I'll describe it
 as example:

 Let's assume our line of code looks like this:
 painter.drawText(getX(), getY(), getString());

 When you're pressing step into in NetBeans it highlights all step
 into possibities, four of them in example above, and highlights one of
 them as default one, so you can press step into once again to go into
 default one or you can click with your mouse on any other to step into
 it. Then, when you're stepped all your way up to the end of getX() for
 example you're returned to the same line, with one function marked as
 visited, and you can step into another one.

 But that's debugging Java, not C++?

 For a fair comparison you would have to compare NetBeans for C++ with Qt
 Creator, and given that it uses gdb as backend I strongly doubt the
 functionality you describe exists there.

 We are more or less restricted to what the debugging backend (gdb in
 this case) provides, and gdb does not have such 'list all function calls
 in this line' kind of capability.

 When I think about it. We could try to use information from the code
 model and temporary breakpoints to simulate this. I guess we will run
 into interesting behaviour for inlined code, though. Maybe it's still
 worth a shot.

Of course, I am not telling that Qt Creator is bad or something, I am
just new to C++, started learning it as a hobby after feeling the
power of Qt with Qt Jambi. And after I tried all easily available C++
IDEs (about 15 of them) I found Qt Creator absolute winner. I just
didn't got used to it's behaviour yet.

About java-style debugging behaviour - may be it will be better to
create an issue in gdb project?

 In QtCreator it steps in the first one to execute (getX() in our
 case), and when you're stepping over the internals of function up to
 the end - Qt Creator will not show you the original line again with
 possibility to step into next function but will act as step over it.

 I know this is unfortunate, but again, there's no way to know in advance
 whether a 'step over' will leave the current function or not, so there
 is not much choice except to provide a separate command to specifically
 step out of a function (Shift-F11).

 So it took me some time to understand that I should press step into

 [Rather step out...]

 on the last lines of getX() to step into getY(), but I can't just skip
 them and step directly into drawText().

 Yes, it would be seven keystrokes in this case.

 Andre'
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-22 Thread Coda Highland
 About java-style debugging behaviour - may be it will be better to
 create an issue in gdb project?

Probably, but I have my doubts you'll see much action on it; there are
a lot bigger fish to fry.

/s/ Adam
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-21 Thread Aekold Helbrass
Andre' thanx for your fast response.

It was totally my own fault, it's just Qt Creator debugging behaviour
differs from NetBeans or Eclipse in a bit less intuitive way. Now I
see it really works fine.

On Wed, May 19, 2010 at 5:53 PM, André Pönitz andre.poen...@nokia.com wrote:
 On Wednesday 19 May 2010 15:52:10 ext Aekold Helbrass wrote:
 Hi All!

 I builded Qt in debug mode, it's working but I want to debug into Qt
 sources.

 This should work out-of-the box.

 Please attach the full debugger log (Debug-Views-Debugger, right pane).

 Andre'
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-21 Thread Andre Poenitz
On Fri, May 21, 2010 at 08:06:25PM +0300, Aekold Helbrass wrote:
 Andre' thanx for your fast response.
 
 It was totally my own fault, it's just Qt Creator debugging behaviour
 differs from NetBeans or Eclipse in a bit less intuitive way.

In which way is it less intuitive?

Andre'
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-21 Thread Aekold Helbrass
I am using NetBeans (Java) for my everyday work, so I'll describe it as example:

Let's assume our line of code looks like this:
painter.drawText(getX(), getY(), getString());

When you're pressing step into in NetBeans it highlights all step
into possibities, four of them in example above, and highlights one of
them as default one, so you can press step into once again to go into
default one or you can click with your mouse on any other to step into
it. Then, when you're stepped all your way up to the end of getX() for
example you're returned to the same line, with one function marked as
visited, and you can step into another one.

In QtCreator it steps in the first one to execute (getX() in our
case), and when you're stepping over the internals of function up to
the end - Qt Creator will not show you the original line again with
possibility to step into next function but will act as step over it.
So it took me some time to understand that I should press step into
on the last lines of getX() to step into getY(), but I can't just skip
them and step directly into drawText().

On 5/21/10, Andre Poenitz andre.poen...@mathematik.tu-chemnitz.de wrote:
 On Fri, May 21, 2010 at 08:06:25PM +0300, Aekold Helbrass wrote:
 Andre' thanx for your fast response.

 It was totally my own fault, it's just Qt Creator debugging behaviour
 differs from NetBeans or Eclipse in a bit less intuitive way.

 In which way is it less intuitive?

 Andre'
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-21 Thread Coda Highland
The behavior you describe from Creator is the standard behavior used
by gdb, and it's consistent with Eclipse, Xcode, and Visual Studio
(even though VS doesn't use gdb); it's pretty typical for a debugger.

/s/ Adam

On Fri, May 21, 2010 at 3:05 PM, Aekold Helbrass helbr...@gmail.com wrote:
 I am using NetBeans (Java) for my everyday work, so I'll describe it as 
 example:

 Let's assume our line of code looks like this:
 painter.drawText(getX(), getY(), getString());

 When you're pressing step into in NetBeans it highlights all step
 into possibities, four of them in example above, and highlights one of
 them as default one, so you can press step into once again to go into
 default one or you can click with your mouse on any other to step into
 it. Then, when you're stepped all your way up to the end of getX() for
 example you're returned to the same line, with one function marked as
 visited, and you can step into another one.

 In QtCreator it steps in the first one to execute (getX() in our
 case), and when you're stepping over the internals of function up to
 the end - Qt Creator will not show you the original line again with
 possibility to step into next function but will act as step over it.
 So it took me some time to understand that I should press step into
 on the last lines of getX() to step into getY(), but I can't just skip
 them and step directly into drawText().

 On 5/21/10, Andre Poenitz andre.poen...@mathematik.tu-chemnitz.de wrote:
 On Fri, May 21, 2010 at 08:06:25PM +0300, Aekold Helbrass wrote:
 Andre' thanx for your fast response.

 It was totally my own fault, it's just Qt Creator debugging behaviour
 differs from NetBeans or Eclipse in a bit less intuitive way.

 In which way is it less intuitive?

 Andre'
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-19 Thread André Pönitz
On Wednesday 19 May 2010 15:52:10 ext Aekold Helbrass wrote:
 Hi All!
 
 I builded Qt in debug mode, it's working but I want to debug into Qt
 sources.

This should work out-of-the box.

Please attach the full debugger log (Debug-Views-Debugger, right pane).

Andre'
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator