Re[2]: [PHP-GENERAL] debugging

From: Date: Thu, 22 Jun 2000 18:12:25 +0000
Subject: Re[2]: [PHP-GENERAL] debugging
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2681@lists.php.net to get a copy of this message
Hello Rasmus, Thursday, June 22, 2000, 9:26:57 PM, you wrote: >> As a result of poor quality of scripting engine very much frequently >> error is displayed on the last line of the file instead of real >> places. I have found many questions on it, but has not found the >> answers. Whether it is possible to receive from PHP better error >> messages? RL> You will see the same effect for just about any scripting language. If Same, but no exactly. I shall compare with VBScript, because I know it. PHP gives much more freedom, than VBScript. And as the consequence, for achievement of similar speed of debugging requires much more detailed diagnostics. But it not so. For example, PHP allows to create text constants on many lines. In VBScript in case of an error in an amount of ' we shall receive an error in the same line, in PHP - somewhere very much far. It is completely obvious, that for diagnostics in this case we should write, where began the last object. Similar diagnostics should be with others of delimiters: if in case of an error to write in what line _began the last closed or unclosed object_, it would speed up diagnostics many times over. RL> you miss a ) or a " somewhere in your script, the parser will parse right RL> to the end looking for the closing bracket or quote. Use a RL> syntax-highlighting text editor, and errors like these will stand out. Or How about this? // ' Old ASP comment... Also it is a not unique situation. :( (I translated ASP scripts on PHP and had possibility in detail to study situations, which for want of it arise.) RL> feed it through PHP's internal syntax highlighter by symlinking your file RL> to a .phps extension. It not always is possible. RL> By the way, please try to improve the tone of your questions in the RL> future. The English language not main for me, therefore I so poorly write. -- Best regards, akul mailto:akul@otamedia.com

« previous php.general (#2681) next »