[Lazarus] Debugger: on exception, debugger has no values to inspect

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Debugger: on exception, debugger has no values to inspect

Graeme Geldenhuys-3
Hi,

I'm running my application via the IDE and get an Exception error. The
dialog pops up showing me the exception with two options - Break or
Continue. I select Break which takes me to the code in question (well
almost). I then use the Call Stack dialog to move further back in the
code (say Index = 10 in the Call Stack dialog), but I can't inspect any
variables at that point.

Is this by design? Is it a bug with the debugger?  If by design and I
can't inspect variables at that point, then what's the point of the
Exception dialog giving me the option to Break into the code.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Debugger: on exception, debugger has no values to inspect

Graeme Geldenhuys-3
On 2016-09-08 10:56, Graeme Geldenhuys wrote:
> I then use the Call Stack dialog to move further back in the
> code (say Index = 10 in the Call Stack dialog), but I can't inspect any
> variables at that point.


I forgot to mention - in case this is of help...

$ gdb --version
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-83.el6)

and Lazarus 1.7 r52715 FPC 2.6.4 x86_64-linux-gtk 2

Regards,
  Graeme

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Debugger: on exception, debugger has no values to inspect

Martin Frb
On 08/09/2016 11:06, Graeme Geldenhuys wrote:

> On 2016-09-08 10:56, Graeme Geldenhuys wrote:
>> I then use the Call Stack dialog to move further back in the
>> code (say Index = 10 in the Call Stack dialog), but I can't inspect any
>> variables at that point.
>
> I forgot to mention - in case this is of help...
>
> $ gdb --version
> GNU gdb (GDB) Red Hat Enterprise Linux (7.2-83.el6)
>
> and Lazarus 1.7 r52715 FPC 2.6.4 x86_64-linux-gtk 2
>
>
it should work.

what does the "locals" window show? Does it change, when you change the
stack?

And you need to press the "current" button in the stack. doubleclick
does not select it.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Debugger: on exception, debugger has no values to inspect

Graeme Geldenhuys-3
On 2016-09-08 19:07, Martin Frb wrote:
> And you need to press the "current" button in the stack. doubleclick
> does not select it.

Ah, that was the problem. Thanks for help. Amazing I never noticed it
before.

A question though:
Why must you click "current" before the stack (an local variables)
update? Wouldn't that be the obvious thing to do (desired behaviour)
when you double click back into the stack history? The "current" button
just seems redundant.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Debugger: on exception, debugger has no values to inspect

Mark Morgan Lloyd
On 09/09/16 08:54, Graeme Geldenhuys wrote:
> On 2016-09-08 19:07, Martin Frb wrote:> And you need to press the "current" button in the stack. doubleclick > does not select it.
> Ah, that was the problem. Thanks for help. Amazing I never noticed itbefore.

Thanks also from me, I'd always assumed there were good reasons for that
behaviour (stack destroyed by exception or somesuch) which I think makes
Graeme's question pertinent:

> A question though:Why must you click "current" before the stack (an local variables)update? Wouldn't that be the obvious thing to do (desired behaviour)when you double click back into the stack history? The "current" buttonjust seems redundant.
> Regards,  Graeme

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Debugger: on exception, debugger has no values to inspect

Martin Frb
In reply to this post by Graeme Geldenhuys-3
On 09/09/2016 09:42, Graeme Geldenhuys wrote:

> On 2016-09-08 19:07, Martin Frb wrote:
>> And you need to press the "current" button in the stack. doubleclick
>> does not select it.
> Ah, that was the problem. Thanks for help. Amazing I never noticed it
> before.
>
> A question though:
> Why must you click "current" before the stack (an local variables)
> update? Wouldn't that be the obvious thing to do (desired behaviour)
> when you double click back into the stack history? The "current" button
> just seems redundant.
>

No idea why, but iirc it always was like this.  (that applies to
breakpoints too)
double click => jump to code
current => set the frame for inspection

Years ago the debugger would get all watches before it could do any
further action, if "current" was changed (and with many watches this
could be very slow). So if you would double click, several frames, to
find the one you are interested, you would have a lot of waiting time.

Now the debugger, can continue even if there are still watches to
inspect, so it would be faster.
Maybe double click can (optionally?) include "current".

------------------------
Not sure, if in case of exception the correct frame is selected (ideally
not the one in fpc_except).
This is sometimes one frame off, because some methods in RTL have no
stackframe.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus