Date: 07/31/00
- Next message: eschmid+sic <email protected>: "Re: [PHP-DOC] cvs: phpdoc /pt_BR/appendices escaping.xml history.xml http-stuff.xml regexp.xml"
- Previous message: Ron Chmara: "Re: [PHP-DOC] Manual Errata Clean Up"
- Next in thread: Ricardo Soares Guimarães: "[PHP-DOC] cvs: phpdoc /pt_BR/appendices debugger.xml"
- Maybe reply: Ricardo Soares Guimarães: "[PHP-DOC] cvs: phpdoc /pt_BR/appendices debugger.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
soneca Mon Jul 31 15:17:15 2000 EDT
Added files:
/phpdoc/pt_BR/appendices debugger.xml
Log:
Beggining translation
Index: phpdoc/pt_BR/appendices/debugger.xml
+++ phpdoc/pt_BR/appendices/debugger.xml
<appendix id="debugger">
<title>O debugador do PHP</title>
<sect1 id="debugger-using">
<title>Usando o Debugador</title>
<para>
PHP's internal debugger is useful for tracking down evasive bugs.
The debugger works by connecting to a <acronym>TCP</acronym> port
for every time PHP starts up. All error messages from that
request will be sent to this TCP connection. This information is
intended for "debugging server" that can run inside an
<acronym>IDE</acronym> or programmable editor (such as Emacs).
</para>
<para>
How to set up the debugger:
<orderedlist>
<listitem>
<simpara>
Set up a TCP port for the debugger in the <link
linkend="configuration.file">configuration file</link> (<link
linkend="ini.debugger.port">debugger.port</link>) and enable it
(<link linkend="ini.debugger.enabled">debugger.enabled</link>).
</simpara>
</listitem>
<listitem>
<simpara>
Set up a TCP listener on that port somewhere (for example
<command>socket -l -s 1400</command> on UNIX).
</simpara>
</listitem>
<listitem>
<simpara>
In your code, run
"debugger_on(<replaceable>host</replaceable>)", where
<replaceable>host</replaceable> is the IP number or name of the
host running the <acronym>TCP</acronym> listener.
</simpara>
</listitem>
</orderedlist>
Now, all warnings, notices etc. will show up on that listener
socket, <emphasis>even if you them turned off with
<function>error_reporting</function></emphasis>.
</para>
</sect1>
<sect1 id="debugger-protocol">
<title>Debugger Protocol</title>
<para>
The 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 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 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 error message.</entry>
</row>
<row>
<entry><literal>location</literal></entry>
<entry>
File name and line number where the error occured. 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 occured at top-level).
</entry>
</row>
<row>
<entry>
<literal>function</literal></entry>
<entry>
Name of function where the error occured. 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>dados</replaceable></term>
<listitem>
<simpara>Line data.</simpara>
</listitem>
</varlistentry>
</variablelist>
<table>
<title>Tipos de erros de debugação</title>
<tgroup cols="2">
<thead>
<row>
<entry>Debugador</entry>
<entry>Interno do PHP</entry>
</row>
</thead>
<tbody>
<row>
<entry><errortype>atenção</errortype></entry>
<entry><errortype>E_WARNING</errortype></entry>
</row>
<row>
<entry><errortype>erro</errortype></entry>
<entry><errortype>E_ERROR</errortype></entry>
</row>
<row>
<entry><errortype>interpretação</errortype></entry>
<entry><errortype>E_PARSE</errortype></entry>
</row>
<row>
<entry><errortype>notificação</errortype></entry>
<entry><errortype>E_NOTICE</errortype></entry>
</row>
<row>
<entry><errortype>grave erro</errortype></entry>
<entry><errortype>E_CORE_ERROR</errortype></entry>
</row>
<row>
<entry><errortype>grave atenção</errortype></entry>
<entry><errortype>E_CORE_WARNING</errortype></entry>
</row>
<row>
<entry><errortype>desconhecido</errortype></entry>
<entry>(qualquer outro)</entry>
</row>
</tbody>
</tgroup>
</table>
<example>
<title>Exemplo de Mensagem de Debug</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
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
- Next message: eschmid+sic <email protected>: "Re: [PHP-DOC] cvs: phpdoc /pt_BR/appendices escaping.xml history.xml http-stuff.xml regexp.xml"
- Previous message: Ron Chmara: "Re: [PHP-DOC] Manual Errata Clean Up"
- Next in thread: Ricardo Soares Guimarães: "[PHP-DOC] cvs: phpdoc /pt_BR/appendices debugger.xml"
- Maybe reply: Ricardo Soares Guimarães: "[PHP-DOC] cvs: phpdoc /pt_BR/appendices debugger.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

