View Issue Details

IDProjectCategoryView StatusLast Update
0012111LazarusDebuggerpublic2018-08-28 12:32
ReporterAttila BorkaAssigned ToMartin Friebe 
PrioritynormalSeverityfeatureReproducibilityalways
Status assignedResolutionopen 
Product Version0.9.25 (SVN)Product Build 
Target VersionFixed in Version 
Summary0012111: Debugger watch list window expression always gives error when trying to see a property of an object
DescriptionDuring debugging in Lazarus: View -> Debug Windows -> Watches

When I try to enter mystringlist.text into the expression window it says "A syntax error in expression, near `TEXT`".
No matter what property of what object (within my project/unit/procedure etc.) I try it is always this syntax error message. Tried different ways to specify the property but no luck.


TagsNo tags attached.
Fixed in Revision
LazTargetpost 1.6
Widgetset
Attached Files

Relationships

has duplicate 0002008 closedMarc Weustink "A parse error in expression, near ..." 
has duplicate 0012522 closedMarc Weustink Impossible to watch properties and certain variable expressions 
has duplicate 0015498 closedMarc Weustink Can't evaluate Memo1.Lines 
has duplicate 0008736 closedMarc Weustink Debugger evaluation cannot get class member 
has duplicate 0027413 resolvedMartin Friebe Watch List can not handel 
has duplicate 0034182 resolvedMartin Friebe 'Watch' refuses to see my variables Laz can and does ?HUH! 

Activities

Vincent Snijders

2008-09-10 10:20

manager   ~0022107

Text is a property. The debugger does not support retreiving values of properties, only values of fields.

Attila Borka

2008-09-10 19:57

reporter   ~0022119

Well, so it is not a bug but an absolutely necessary feature we need in order to be able to debug a program in a RAD tool like Lazarus.

What are we supposed to do with a mystringlist -> TStringList 0x34554e8? We are writing object pascal code and 90% of the time it is a property of an object we use and would like to see the value of when debugging.

Right now the only way to see a value of a property during debugging a program is to to use a log file which makes us write twice as much code.

In my opinion this is absolutely a show stopper for any release of a RAD tool. Definitely not Lazarus post 1.2 release issue.

Vincent Snijders

2008-09-10 23:12

manager   ~0022126

Yes, you are absolutely right. We are still looking for a volunteer to implement this feature as soon as possible. Until we have found the volunteer, is not realistic to say that it will be added before the 1.0 release.

Attila Borka

2008-09-11 03:27

reporter   ~0022135

Roger roger. I agree with you about a 1.0 target release.

But it says "post 1.2" at the moment.

Graeme Geldenhuys

2010-02-05 12:19

reporter   ~0034243

I would say this feature is required for 1.0 release. Marking it as 'post 1.2' means infinity (never to be fixed) - considering that v1.0 has still not been reached after XX amount of years.

At least in the FPC 2.4 release and latest Lazarus debugging has improved a lot, so thanks to those that helped.

Vincent Snijders

2010-02-05 12:36

manager   ~0034244

Marking it as 'post 1.2' means, that contributions from the community are required to get it in 1.0.

Denis Kozlov

2014-11-22 00:10

reporter   ~0079257

Last edited: 2014-11-22 00:12

View 2 revisions

It's 6 years old now, making this one of the oldest cricital features not yet implemeted.

Has there been any progress at all?

P.S. I'm trying to debug LCL code to investigate some of the reported bugs here, but it's a nightmare without being able to watch object properties.

Martin Friebe

2014-11-22 00:39

manager   ~0079260

Last edited: 2014-11-22 00:40

View 2 revisions

Afaik neither stabs, nor dwarf (the 2 formats in which fpc can encode debug info) have a way to encode properties.

So at current, fpc does not include any info about properties in the debug info.

gdb only supports stabs/dwarf, so gdb too does not support this.

There are only 2 ways:
- Wait for gdb
- Write a new debugger from scratch

The 3rd option, finding another existing debugger is (if at all possible) not likely to happen, as it would need to add an entire new debug info to fpc)

The 2nd way has been started this year. But it is still in progress, and it currently misses many of the features gdb offered.
Once it is stable enough (no date yet) then plans can be made to get an addition to fpc to encode properties in some way. (maybe some newer dwarf (5 or 6) will have it)

I would say there are still a few years of work to go.

Robb

2015-11-02 15:38

reporter   ~0087064

Any news about this bug?

Robb

2017-02-21 20:10

reporter   ~0098359

How far have we come?

Robb

2017-02-24 13:35

reporter   ~0098422

I give 100USD via to whoever has a solution to this bug, it's just 9 years old.

Graeme Geldenhuys

2017-02-24 14:50

reporter   ~0098423

Last edited: 2017-02-24 14:53

View 3 revisions

Just to add to Martin Friebe's last comment. I think he is wrong in some of what he said. Last time I looked at the DWARF specification, it does allow you to define "custom types or entries". So in theory FPC should be able to use that to describe Object Pascal Properties via debug info. How you read that custom information back is another question, but I'm pretty sure GDB probably has support for that.

Not being able to debug properties (a language feature used a damn lot of the time) is a HUGE pita when working with FPC.

Juha Manninen

2017-02-24 15:28

developer   ~0098424

Last edited: 2017-02-24 15:30

View 3 revisions

> Any news about this bug?

In practice this feature requires the new fpdebug. It is under construction and works somehow but does not support properties yet. At least Martin and Joost have been working on it.

I am rather suspicious about using DWARF + GDB for it. Problems will come up for sure.
IIRC Greame has another Pascal debugger also named fpdebug which also inherits from Duby.
Greame, could these 2 projects be joined somehow?

> I give 100USD via to whoever has a solution to this bug, it's just 9 years old.

Actually it is a missing feature and is older than 9 years.
Effectively the money would go for fpdebug development which is a good idea.
Please set a bounty here:
 http://wiki.freepascal.org/Bounties
Participating in fpdebug development is another way to speed up things.

Robb

2017-02-26 01:38

reporter   ~0098464

Thanks for the link http://wiki.freepascal.org/Bounties Juha Manninen.
Bounty is put on that pages now.

Issue History

Date Modified Username Field Change
2008-09-10 02:08 Attila Borka New Issue
2008-09-10 02:08 Attila Borka Status new => assigned
2008-09-10 02:08 Attila Borka Assigned To => Marc Weustink
2008-09-10 02:08 Attila Borka Widgetset => Win32
2008-09-10 10:20 Vincent Snijders Note Added: 0022107
2008-09-10 10:44 Vincent Snijders LazTarget => post 1.2
2008-09-10 10:44 Vincent Snijders Widgetset Win32 =>
2008-09-10 10:44 Vincent Snijders Severity major => feature
2008-09-10 19:57 Attila Borka Note Added: 0022119
2008-09-10 23:12 Vincent Snijders Note Added: 0022126
2008-09-11 03:27 Attila Borka Note Added: 0022135
2010-01-12 01:36 Marc Weustink Relationship added has duplicate 0002008
2010-01-12 01:37 Marc Weustink Relationship added has duplicate 0012522
2010-01-12 01:39 Marc Weustink Relationship added has duplicate 0015499
2010-01-12 01:40 Marc Weustink Relationship deleted has duplicate 0015499
2010-01-12 01:40 Marc Weustink Relationship added has duplicate 0015498
2010-02-05 12:19 Graeme Geldenhuys Note Added: 0034243
2010-02-05 12:36 Vincent Snijders Note Added: 0034244
2010-04-12 23:52 Marc Weustink Relationship added has duplicate 0008736
2013-09-03 12:07 Martin Friebe LazTarget post 1.2 => 1.4
2014-07-07 21:45 Marc Weustink Assigned To Marc Weustink => Martin Friebe
2014-11-22 00:10 Denis Kozlov Note Added: 0079257
2014-11-22 00:12 Denis Kozlov Note Edited: 0079257 View Revisions
2014-11-22 00:39 Martin Friebe Note Added: 0079260
2014-11-22 00:40 Martin Friebe Note Edited: 0079260 View Revisions
2015-02-07 05:54 Martin Friebe Relationship added has duplicate 0027413
2015-03-01 18:25 Martin Friebe LazTarget 1.4 => post 1.6
2015-11-02 15:38 Robb Note Added: 0087064
2017-02-21 20:10 Robb Note Added: 0098359
2017-02-24 13:35 Robb Note Added: 0098422
2017-02-24 14:50 Graeme Geldenhuys Note Added: 0098423
2017-02-24 14:52 Graeme Geldenhuys Note Edited: 0098423 View Revisions
2017-02-24 14:53 Graeme Geldenhuys Note Edited: 0098423 View Revisions
2017-02-24 15:28 Juha Manninen Note Added: 0098424
2017-02-24 15:28 Juha Manninen Note Edited: 0098424 View Revisions
2017-02-24 15:30 Juha Manninen Note Edited: 0098424 View Revisions
2017-02-26 01:38 Robb Note Added: 0098464
2018-08-28 12:32 Martin Friebe Relationship added has duplicate 0034182