tag:blogger.com,1999:blog-4818293967282096791.post2832851985418188865..comments2023-12-01T01:44:11.747-08:00Comments on Delphi Bar: Only use ShowMessage() function for debuggingUnknownnoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4818293967282096791.post-45983308599566759372017-04-19T12:45:16.045-07:002017-04-19T12:45:16.045-07:00I would not emphase this method as perfect solutio...I would not emphase this method as perfect solution either. <br />Stefan is absolutely right.<br /><br />The ShowMessage is the least attractive debug option IMHO.<br />What I do in some smaller projects is to embed a hidden label, with a timed fallback system.<br />So that I can show debug messages (even the end-user can activate the debug mode with a secret key from hotline assistance), and then show a debug statusLine for a short time.<br />The debug mode is not persistant, and will be OFF in next startup.<br /><br />This poor mans logger is even better than ShowMessage, since it doesn't interfear normal operation by popups too much.<br /><br />RolloAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4818293967282096791.post-40945974329483249932017-04-19T05:55:28.291-07:002017-04-19T05:55:28.291-07:00One advantage of ShowMessage is point 2, you can e...One advantage of ShowMessage is point 2, you can easily search the code quickly for all instances of ShowMessage and deal with them, I completely remove them. Logging raises other questions, but if it is used for debugging, in the code it should be highlighted, with a comment, todo or even placed in a conditional define. <br /><br />There are advantages with logging include additional information being added by the existing logging code, logs files are store on the file system so can easily be copied and sent to the developer. One area that needs to be addressed relates to my point 2, what happens if the developer leaves some logging code in there which should not be there for obvious security reasons? One answer is that logging needs to be encrypted, in-fact this really is a must nowadays if the logs are being copied and sent by email or other file transfer methods. <br /><br />Richardhttps://www.blogger.com/profile/03817406301425251310noreply@blogger.comtag:blogger.com,1999:blog-4818293967282096791.post-56307352179374431092017-04-19T04:01:01.511-07:002017-04-19T04:01:01.511-07:00Never use ShowMessage for debugging - use logging....Never use ShowMessage for debugging - use logging. There are numerous solutions for that.Stefan Glienkehttps://www.blogger.com/profile/05509404049325709406noreply@blogger.com