[Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
Santiago A. wrote: Hello: In barrapunto.com (a Spanish slashdot) there is an article asking What do you know about Lazarus?. Most comments were positive, and most negative comments were against Pascal (it's a dead language etc) more than against Lazarus. Here is the link to the article (in Spanish) http://preguntas.barrapunto.com/article.pl?sid=09/09/28/2211206 But there were a few comments with objections to Lazarus. One of them was about debugger. This comment the (also in Spanish) http://preguntas.barrapunto.com/comments.pl?sid=82108cid=1176899 In this comment he supported Lazarus, but the last paragraphs made some objections. Here is a translation of the last paragraphs, sorry if my English is not good enough Some problems I find in Lazarus a those that unfortunatelly can be found in most OSS. On one hand they have amazing features that can't be found in their commercial counterparts, on the other hand they lack elemental features that are waiting to be implemented and waiting and waiting and waiting and waiting Well as I already mailed: Some properties can be inspected now (using fpc 2.3.1 and dwarf). So this is (partly) fixed. Some properties means properties that have an read-accessor pointing to a variable. Properties that have a function to provide the value can not be inspected. * And I am more than happy they can not * Yes Delphi can do this and does do this. And what does it mean? If in Delphi I accidentally hover the mouse over a property, The function is called (actually Delphi calls it twice). As a result all Values on the object change (because many functions do more than just read values, they update values too). The application is in a state that is no longer correct (because the values have changed to something they where not supposed to be). And I have to abort my debug session and start over. What help is that? What help is it when an IDE (Delphi) silently and without warning does things that change the state of my application. How can I expect any results from debugging if the IDE messes around in such ways with the application that I debug? As far as I am aware the purpose of debugging is to get the same results as in a normal execution. This is unless I intentionally and explicitly ask the debugger/IDE to modify the data. Please feel free to translate to Spanish, and post in the above forum. Best Regards Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
I disagree with you. Most getter functions only do that, get the value without changing anything, but are functions because the resulting value is processed. A property getter function, can, but should not, change anything. Even if the getter changes something, it´s up to you, as a developer, to inspect such property or not... I use this every day on Delphi and, in my work, is an invaluable tool, that lazarus should have. May be, for people like you, in the debugger options page, could be an option to disable this funcionatility for tooltip debugging or for all the debugging, but this should be enabled by default. This is only my point of view. Horacio Martin escribió: Properties that have a function to provide the value can not be inspected. * And I am more than happy they can not * Yes Delphi can do this and does do this. And what does it mean? If in Delphi I accidentally hover the mouse over a property, The function is called (actually Delphi calls it twice). As a result all Values on the object change (because many functions do more than just read values, they update values too). The application is in a state that is no longer correct (because the values have changed to something they where not supposed to be). And I have to abort my debug session and start over. What help is that? What help is it when an IDE (Delphi) silently and without warning does things that change the state of my application. How can I expect any results from debugging if the IDE messes around in such ways with the application that I debug? As far as I am aware the purpose of debugging is to get the same results as in a normal execution. This is unless I intentionally and explicitly ask the debugger/IDE to modify the data. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
2009/10/2 Horacio Jamilis hjami...@pymesoft.com.ar: May be, for people like you, in the debugger options page, could be an option to disable this funcionatility for tooltip debugging or for all the debugging, but this should be enabled by default. This is only my point of view. I fully agree. Delphi has that option by default and it is very handy. Yes you could have unexpected result, but that is up to you as a developer to know your own code. A option to disable such support could be handy for developers like Martin, but I am pretty sure most other developers would like that option enabled by default. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
Horacio Jamilis wrote: I disagree with you. Most getter functions only do that, get the value without changing anything, but are functions because the resulting value is processed. A property getter function, can, but should not, change anything. Even if the getter changes something, it´s up to you, as a developer, to inspect such property or not... I use this every day on Delphi and, in my work, is an invaluable tool, that lazarus should have. May be, for people like you, in the debugger options page, could be an option to disable this funcionatility for tooltip debugging or for all the debugging, but this should be enabled by default. The feature that is missing in lazarus is function evaluation and yes it is (yet) missing. As for how valuable it is, is a personal question. I rarely need it, some other people can not live without it. As for Most getter functions only do that, get the value : I don't have delphi sources, I cannot check. But for example the property Handle afaik does change things (if no handle has been allocated it will do that, including requesting it from the OS). And delphi is inconsistent in that. property Foo read GetFoo; if i put foo and getFoo in my watches window, then: - Foo is evaluated (despite the fact that function evaluation is NOT ticked on the watches property) If you ask me, it should *only* work, if explicit enabled. - getFoo is not evaluated (correct because function evaluation is NOT ticked on the watches property) So why is Foo evaluating a function, even so this is not enabled by the settings for this watch? That is a bug if you ask me, and a severe one, since it can thrash hours of debugging work. Oh yes, of course, I know when I add it as a watch. Actually I may do, but someone new to deplhi doesn't (I was once new to it too), so they get screwed... And keep in mind, even a function that is not supposed to modify thinks can end up doing so. Evaluating the function, at a time the function was not meant to be called, may cause a crash, and may cause memory corruption. There are plenty of hidden dangers, they may only occur in a few situations, but the can and will. And there is no warning at all, Simple pointing your mouse on a property (and getting hint evaluation) can destroy hours of debugging effort (again no warning...) And if the property has a function that does modifications: if you put it in the watches and then run the hint too = you see different values (because they changed in between) I agree function evaluation in the debugger can be a very helpful feature. That is it is helpful when used intentionally, sot the developer knows what side-effects may happen. The way Delphi has it, doing it with no warning at all = very dangerous. Best Regards Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
In theory is dangerous, in real world it seldom (if ever) happens. The risk is so little (I have never face such problem) and the advantage so big that the score, in my opinion, is 1E+6 to 1. Santiago A. s...@ciberpiula.net Martin escribió: I agree function evaluation in the debugger can be a very helpful feature. That is it is helpful when used intentionally, sot the developer knows what side-effects may happen. The way Delphi has it, doing it with no warning at all = very dangerous. Best Regards Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
Martin schreef: And to save the honour of graeme, he started 3 threads: http://lists.lazarus.freepascal.org/pipermail/lazarus/2009-September/045378.html http://lists.lazarus.freepascal.org/pipermail/lazarus/2009-September/045380.html http://lists.lazarus.freepascal.org/pipermail/lazarus/2009-September/045383.html All three where basic question, if there was a way, and if so which way it was. Only the last one also expressed some frustration about the inaccessibility of the debug features. Then later mails (other people) developped into statements like The debugger is not usable as it does not have been in the focus to be developed. or lack elemental features that are waiting to be implemented and waiting and waiting and waiting and waiting; And then soon saying this was a reason for people not to use Lazarus, or to move away from Lazarus. And to balance the praise of graeme, he wrote on the wiki http://wiki.lazarus.freepascal.org/Feature_Ideas#Integrated_and_Working_Debugger: quoteDebugging from inside the IDE is near impossible./quote quoteThis should become a bigger priority than more eye-candy for the IDE./quote quoteUnfortunately with open source projects, contributors only contribute to fulfill their own needs, and not the needs of others.quote To me, this pretty much says about the same as in the paragraph above. Fortunately he stillquoteloves the many unique IDE features Lazarus has to offer./quote I wish I was capable of editing that feature request to make it more reasonable and factual. IMHO, the GDB is not as much C/C++ centric, but it is a stand-alone application, and not integrated (in process) in the IDE like in Delphi. Stand-alone debuggers always have more limitations. And what do you think is next? Delphi like packages? Or should that be implemented before we even think about improving the debugging experience in Lazarus? Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
2009/10/2 Vincent Snijders vsnijd...@vodafonevast.nl: And to balance the praise of graeme, he wrote on the wiki Oh, it's Friday again! ;-) http://wiki.lazarus.freepascal.org/Feature_Ideas#Integrated_and_Working_Debugger: I'll try and put that feature request in a more subtle tone. When I wrote that, it must have been one of my troublesome days. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
2009/10/2 Vincent Snijders vsnijd...@vodafonevast.nl: http://wiki.lazarus.freepascal.org/Feature_Ideas#Integrated_and_Working_Debugger: I have updated that text. Please review and modify as you see fit. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
Graeme Geldenhuys schreef: 2009/10/2 Vincent Snijders vsnijd...@vodafonevast.nl: http://wiki.lazarus.freepascal.org/Feature_Ideas#Integrated_and_Working_Debugger: I have updated that text. Please review and modify as you see fit. Thanks, it is more balanced. Maybe a future editor (or me in the future) will remove the paragraph that starts with Unfortunately, as it doesn't have much to do with the feature request itself, more with the fact that you don't implement it. Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
2009/10/2 Vincent Snijders vsnijd...@vodafonevast.nl: Thanks, it is more balanced. Maybe a future editor (or me in the future) will remove the paragraph that starts with Unfortunately, as it doesn't have True. Done! -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] properties (delphi does it wrong too) [Re: debugger feature request created]
Martin schrieb: Well as I already mailed: Some properties can be inspected now (using fpc 2.3.1 and dwarf). So this is (partly) fixed. Some properties means properties that have an read-accessor pointing to a variable. Properties that have a function to provide the value can not be inspected. * And I am more than happy they can not * Yes Delphi can do this and does do this. And what does it mean? If in Delphi I accidentally hover the mouse over a property, The function is called (actually Delphi calls it twice). As a result all Values on the object change (because many functions do more than just read values, they update values too). The application is in a state that is no longer correct (because the values have changed to something they where not supposed to be). And I have to abort my debug session and start over. What help is that? Right. A C++ style const attribute were helpful, in order to distinguish between mere inspectors and other getters that change the state of an object. Or we could add an inspect directive to the property read and write directives... property ... read GetProp [const] [inspect SeeProp] ... DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus