cvs: phpdoc-zh /appendices debugger.xml

From: Date: Mon, 29 Jul 2002 13:26:28 +0000
Subject: cvs: phpdoc-zh /appendices debugger.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-221@lists.php.net to get a copy of this message
class007 Mon Jul 29 09:26:28 2002 EDT Added files: /phpdoc-zh/appendices debugger.xml Log: not finished

Index: phpdoc-zh/appendices/debugger.xml +++ phpdoc-zh/appendices/debugger.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $AUTHOR$ --> <!-- EN-Revision: 1.22 Maintainer: class007 Status: working --> <appendix id="debugger"> <title>Åųý PHP ³ÌÐòµÄ´íÎó</title> <sect1 id="debugger-about"> <title>¹ØÓÚ³ý´íÆ÷(debugger)</title> <simpara> PHP 3 ÄÚ½¨ÍøÂç³ý´íÆ÷Ö§³Ö </simpara> <simpara> PHP 4 ²¢Ã»ÓÐÄÚ²¿³ý´í¹¤¾ß¡£ µ«ÊÇÄú¿ÉÒÔʹÓÃÍⲿ³ý´í¹¤¾ß¡£ <ulink url="&url.zend.ide;">Zend IDE</ulink> ¾ÍÊÇÆäÖÐÖ®Ò»£¬Ëü°üº¬Ò»¸ö³ý´íÆ÷¡£Ò²ÓÐһЩÃâ·ÑµÄ³ý´íÆ÷£¬±ÈÈçÔÚ <ulink url="&url.dbg;">&url.dbg;</ulink> É쵀 DBG£¬»¹ÓÐ <ulink url="&url.apd;">Advanced PHP Debugger</ulink> (APD)¡£ </simpara> </sect1> <sect1 id="debugger-using"> <title>ʹÓóý´íÆ÷</title> <para> PHP 3 ÖеÄÄÚ½¨³ý´íÆ÷¶Ô¸ú×ÙһЩÂß¼­ Bug (evasive bugs) ÊǷdz£ÓÐÓõġ£ ³ý´íÆ÷ÔÚ PHP 3 ÿ´ÎÆô¶¯Ê±Á¬½Óµ½Ò»¸ö <acronym>TCP</acronym> ¶Ë¿Ú¡£ ´Ó Web ÇëÇóÖвúÉúµÄËùÓдíÎóÐÅÏ¢¶¼½«·¢Ë͵½¸Ã TCP Á¬½Ó¡£ ÕâЩÐÅÏ¢¿ÉÒÔ±»¿ÉÔËÐÐÔÚ <acronym>IDE</acronym> »òÕ߿ɱà³Ì±à¼­Æ÷£¨ÀýÈç Emacs£©Öеijý´í·þÎñÆ÷´¦Àí¡£ </para> <para> ÈçºÎÉèÖóý´íÆ÷£º <orderedlist> <listitem> <simpara> ÔÚ<link linkend="configuration.file">ÅäÖÃÎļþ</link>ÖÐΪ³ý´íÆ÷ÉèÖÃÒ»¸ö TCP ¶Ë¿Ú£¨É趨 <link linkend="ini.debugger.port">debugger.port</link> ²ÎÊý£©²¢ÇÒÆôÓÃËü£¨É趨 <link linkend="ini.debugger.enabled">debugger.enabled</link> ²ÎÊý£©¡£ </simpara> </listitem> <listitem> <simpara> ÔÚij´¦ÉèÖøà TCP ¶Ë¿ÚµÄ¼àÌýÆ÷(listener)£¨ÀýÈ磺ÔÚ UNIX ÉÏʹÓà <command>socket -l -s 1400</command> ÃüÁ¡£ </simpara> </listitem> <listitem> <simpara> ÔÚÄãµÄ´úÂëÖУ¬ÔËÐÐ ¡°debugger_on(<replaceable>host</replaceable>)¡±£¬ <replaceable>host</replaceable> Ö¸ÔËÐÐ <acronym>TCP</acronym> ¼àÌýÆ÷µÄÖ÷»úÃû»ò IP µØÖ·¡£ </simpara> </listitem> </orderedlist> ÏÖÔÚ£¬ËùÓеĴíÎó¡¢¾¯¸æ¡¢×¢ÒâµÈµÄ debug ÐÅÏ¢¶¼»áÏÔʾÔÚÄǸö¼àÌýÆ÷ÖС£ <emphasis>¼´Ê¹ÄãʹÓà <function>error_reporting</function> ¹Ø±ÕËüÃÇ£¬ËüÃÇÒ²»áÔÚ¼àÌýÆ÷ÖÐÏÔʾ</emphasis>¡£ </para> </sect1> <sect1 id="debugger-protocol"> <title>Debugger Protocol</title> <para> The PHP 3 debugger protocol is line-based. Each line has a <emphasis>type</emphasis>, and several lines compose a <emphasis>message</emphasis>. Each message starts with a line of the type <literal>start</literal> and terminates with a line of the type <literal>end</literal>. PHP 3 may send lines for different messages simultaneously. </para> <para> A line has this format: <informalexample> <literallayout> <replaceable>date</replaceable> <replaceable>time</replaceable> <replaceable>host</replaceable>(<replaceable>pid</replaceable>) <replaceable>type</replaceable>: <replaceable>message-data</replaceable> </literallayout> </informalexample> <variablelist> <varlistentry> <term><replaceable>date</replaceable></term> <listitem> <simpara> Date in ISO 8601 format (<replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>) </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>time</replaceable></term> <listitem> <simpara>Time including microseconds: <replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>uuuuuu</replaceable> </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>host</replaceable></term> <listitem> <simpara> DNS name or IP address of the host where the script error was generated. </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>pid</replaceable></term> <listitem> <simpara> PID (process id) on <replaceable>host</replaceable> of the process with the PHP 3 script that generated this error. </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>type</replaceable></term> <listitem> <para> Type of line. Tells the receiving program about what it should treat the following data as: <table> <title>Debugger Line Types</title> <tgroup cols="2"> <thead> <row> <entry>Name</entry> <entry>Meaning</entry> </row> </thead> <tbody> <row> <entry><literal>start</literal></entry> <entry> Tells the receiving program that a debugger message starts here. The contents of <replaceable>data</replaceable> will be the type of error message, listed below. </entry> </row> <row> <entry><literal>message</literal></entry> <entry>The PHP 3 error message.</entry> </row> <row> <entry><literal>location</literal></entry> <entry> File name and line number where the error occurred. The first <literal>location</literal> line will always contain the top-level location. <replaceable>data</replaceable> will contain <literal><replaceable>file</replaceable>:<replaceable>line</replaceable></literal>. There will always be a <literal>location</literal> line after <literal>message</literal> and after every <literal>function</literal>. </entry> </row> <row> <entry> <literal>frames</literal></entry> <entry>Number of frames in the following stack dump. If there are four frames, expect information about four levels of called functions. If no "frames" line is given, the depth should be assumed to be 0 (the error occurred at top-level). </entry> </row> <row> <entry> <literal>function</literal></entry> <entry> Name of function where the error occurred. Will be repeated once for every level in the function call stack. </entry> </row> <row> <entry><literal>end</literal></entry> <entry> Tells the receiving program that a debugger message ends here. </entry> </row> </tbody> </tgroup> </table> </para> </listitem> </varlistentry> <varlistentry> <term><replaceable>data</replaceable></term> <listitem> <simpara>Line data.</simpara> </listitem> </varlistentry> </variablelist> <table> <title>Debugger Error Types</title> <tgroup cols="2"> <thead> <row> <entry>Debugger</entry> <entry>PHP 3 Internal</entry> </row> </thead> <tbody> <row> <entry><errortype>warning</errortype></entry> <entry><errortype>E_WARNING</errortype></entry> </row> <row> <entry><errortype>error</errortype></entry> <entry><errortype>E_ERROR</errortype></entry> </row> <row> <entry><errortype>parse</errortype></entry> <entry><errortype>E_PARSE</errortype></entry> </row> <row> <entry><errortype>notice</errortype></entry> <entry><errortype>E_NOTICE</errortype></entry> </row> <row> <entry><errortype>core-error</errortype></entry> <entry><errortype>E_CORE_ERROR</errortype></entry> </row> <row> <entry><errortype>core-warning</errortype></entry> <entry><errortype>E_CORE_WARNING</errortype></entry> </row> <row> <entry><errortype>unknown</errortype></entry> <entry>(any other)</entry> </row> </tbody> </tgroup> </table> <example> <title>Example Debugger Message</title> <literallayout> 1998-04-05 23:27:400966 lucifer.guardian.no(20481) start: notice 1998-04-05 23:27:400966 lucifer.guardian.no(20481) message: Uninitialized variable 1998-04-05 23:27:400966 lucifer.guardian.no(20481) location: (&null;):7 1998-04-05 23:27:400966 lucifer.guardian.no(20481) frames: 1 1998-04-05 23:27:400966 lucifer.guardian.no(20481) function: display 1998-04-05 23:27:400966 lucifer.guardian.no(20481) location: /home/ssb/public_html/test.php3:10 1998-04-05 23:27:400966 lucifer.guardian.no(20481) end: notice </literallayout> </example> </para> </sect1> </appendix> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc.zh (#221) next »