cvs: phpdoc-sk /appendices debugger.xml

From: Date: Fri, 30 Aug 2002 00:41:13 +0000
Subject: cvs: phpdoc-sk /appendices debugger.xml
Groups: php.doc.sk 
Request: Send a blank email to doc-sk+get-20@lists.php.net to get a copy of this message
joseph Thu Aug 29 20:41:13 2002 EDT Added files: /phpdoc-sk/appendices debugger.xml Log: about debugger, use, setting up...

Index: phpdoc-sk/appendices/debugger.xml +++ phpdoc-sk/appendices/debugger.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.20 Maintainer: joseph Status: ready --> <appendix id="debugger"> <title>Ladenie PHP</title> <sect1 id="debugger-about"> <title>O debugeri</title> <simpara> PHP 3 obsahuje podporu pre sie»ové ladiace programy (ïalej debugeri). </simpara> <simpara> PHP 4 ¾iadne interné ladiace príslu¹enstvo nemá, av¹ak mô¾ete pou¾i» nejeden externý debuger. <ulink url="&url.zend.ide;">Zend IDE</ulink> obsahuje debuger a na <ulink url="&url.dbg;">&url.dbg;</ulink> alebo <ulink url="&url.apd;">Advanced PHP Debugger</ulink> (APD) sú tie¾ nejaké voµné roz¹írenia debugerov ako je DBG. </simpara> </sect1> <sect1 id="debugger-using"> <title>Pou¾ívanie debugeru</title> <para> Interný debuger v PHP 3 je nepostrádateµný pre vystopovanie unikajúcich chýb (bugov). Debuger pracuje pripojením sa na <acronym>TCP</acronym> port v¾dy pri spustení PHP 3. V¹etky chybové hlásenia z tejto po¾iadavky sa po¹lú na toto TCP pripojenie. Táto informácia je urèená pre "ladiaci server", ktorý doká¾e be¾a» v <acronym>IDE</acronym> alebo programovateµnom editore (ako je Emacs). </para> <para> Ako nastavi» debuger: <orderedlist> <listitem> <simpara> Nastavte TCP port pre debuger v <link linkend="configuration.file">konfiguraènom súbore</link> (<link linkend="ini.debugger.port">debugger.port</link>) a aktivujte ho (<link linkend="ini.debugger.enabled">debugger.enabled</link>). </simpara> </listitem> <listitem> <simpara> Niekde nastavte na tento port TCP prijímaè (napríklad <command>socket -l -s 1400</command> v UNIXe). </simpara> </listitem> <listitem> <simpara> Vo svojom kóde, spustite "debugger_on(<replaceable>host</replaceable>)", kde <replaceable>host</replaceable> je IP adresa alebo meno hostu, na ktorom be¾í <acronym>TCP</acronym> prijímaè. </simpara> </listitem> </orderedlist> Teraz sa v¹etky upozornenia, výstrahy atï. objavia na sokete tohto príjimaèa, <emphasis>aj keï ste ich vypli funkciou <function>error_reporting</function></emphasis>. </para> </sect1> <sect1 id="debugger-protocol"> <title>Debuger Protokol</title> <para> PHP 3 debuger protokol je zalo¾ený na riadkoch. V¾dy má <emphasis>type</emphasis> a niekoåko riadov tvorí <emphasis>message</emphasis>. Ka¾dá správa zaèína s typovým riadkom <literal>start</literal> a konèí typovým riadkom <literal>end</literal>. PHP 3 mô¾e súèasne posla» riadky pre rôzne správy. </para> <para> Riadok má tento formát: <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> Dátum vo formáte ISO 8601 (<replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>) </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>time</replaceable></term> <listitem> <simpara>Èas vrátane mikrosekúnd: <replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>uuuuuu</replaceable> </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>host</replaceable></term> <listitem> <simpara> Názov DNS alebo IP adresa hostu, kde bola vygenerovaná chyba skriptu. </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>pid</replaceable></term> <listitem> <simpara> PID (process id) na <replaceable>host</replaceable>e procesu s PHP 3 skriptom, ktorý vygeneroval túto chybu. </simpara> </listitem> </varlistentry> <varlistentry> <term><replaceable>type</replaceable></term> <listitem> <para> Typ riadka. Hovorí prímaciemu programu ako sa majú následujúce dáta spracova»: <table> <title>Riadok typov debugeru</title> <tgroup cols="2"> <thead> <row> <entry>Názov</entry> <entry>Význam</entry> </row> </thead> <tbody> <row> <entry><literal>start</literal></entry> <entry> Hovorí prijímaciemu programu, ¾e správa debugeru zaèína tu. Obsahom <replaceable>data</replaceable> bude typ chybového hlásenia uvedený ni¾¹ie. </entry> </row> <row> <entry><literal>message</literal></entry> <entry>Chybové hlásenie PHP 3.</entry> </row> <row> <entry><literal>location</literal></entry> <entry> Názov súboru a èíslo riadku, kde sa chyba vyskytla. Prvý <literal>location</literal> riadok bude obsahova» top-level pozíciu. <replaceable>data</replaceable> bude obsahova» <literal><replaceable>file</replaceable>:<replaceable>line</replaceable></literal>. V¾dy bude riadok <literal>location</literal> po <literal>message</literal> a po ka¾dej <literal>function</literal>. </entry> </row> <row> <entry> <literal>frames</literal></entry> <entry>Poèet rámcov v následujúcom nahromadení. Ak sú rámce ¹tyri, oèakávajte informáciu o ¹tyroch úrovniach volaných funkcií. Ak nebol zadaný ¾iaden "frames" riadok, håbka by mala by» priradená k hodnote 0 (vyskytla sa chyba na top-leveli). </entry> </row> <row> <entry> <literal>function</literal></entry> <entry> Názov funkcie, kde sa vyskytla chyba. Znovu sa zopakuje pre ka¾dú úroveò vo volaní nahromadenia funkcie. </entry> </row> <row> <entry><literal>end</literal></entry> <entry> Hovorí prijímaciemu programu, ¾e správa debugera konèí tu. </entry> </row> </tbody> </tgroup> </table> </para> </listitem> </varlistentry> <varlistentry> <term><replaceable>data</replaceable></term> <listitem> <simpara>Riadok dát</simpara> </listitem> </varlistentry> </variablelist> <table> <title>Typy chýb debugera</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>(nejaká iná)</entry> </row> </tbody> </tgroup> </table> <example> <title>Príklad správy debugera</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.sk (#20) next »