Home » Language IDEs » PHP Development Tools (PDT) » how to use the PDT Debugger with application programs instead of browsers?
how to use the PDT Debugger with application programs instead of browsers? [message #51190] |
Thu, 13 September 2007 18:34 |
Edward Pring Messages: 9 Registered: July 2009 |
Junior Member |
|
|
I'm trying to use the Zend PDT Debugger to debug PHP scripts that
implement REST and SOAP web services for clients that are application
programs, not browsers.
For my runtime, I have installed "Zend Core for IBM 2.0.3" (Apache
2.2.2, PHP 5.2.3, and Zend Debugger 5.2.9). For my IDE, I have
installed "Eclipse PDT all-in-one-incubation S20070910 RC1".
When the Eclipse "Debug As -> PHP Web Page" action invokes PHP scripts
with a browser, the PDT Debugger works as expected: the Debugger stops
at breakpoints in PHP scripts, and the browser receives the output of
the scripts.
But when an application program (such as a Java or C program, or the
"wget" or "curl" command) invokes the same scripts with the same URLs,
they don't appear to execute at all: the PDT Debugger does not stop on
breakpoints in PHP scripts, and the clients receive no output from the
scripts (that is, the content of HTTP response messages is empty).
The Eclipse "Debug As -> PHP Web Page" action launches browsers with a
URL that contains a lot of debugger-related arguments, like this:
http://localhost/whatever/index.php
?debug_session_id=1005
&start_debug=1
&debug_start_session=1
&debug_host=9.2.26.33%2C127.0.0.1
&debug_no_cache=1189699647453
&debug_port=10000
&send_sess_end=1
&original_url=http://localhost/whatever/index.php
&debug_stop=1
I have not found any documentation on these debugger-related arguments,
or the debugging protocol used on port 10000.
How can application programs written in Java or C invoke PHP scripts
with URLs like these so that the PDT Debugger will work?
-- Edward Pring <pring@us.ibm.com>
|
|
|
Re: how to use the PDT Debugger with application programs instead of browsers? [message #51326 is a reply to message #51190] |
Thu, 13 September 2007 20:19 |
Eclipse User |
|
|
|
Originally posted by: schreck84.gmail.com
"Edward Pring" <pring@us.ibm.com> wrote in message
news:fcbvrf$q02$1@build.eclipse.org...
> I'm trying to use the Zend PDT Debugger to debug PHP scripts that
> implement REST and SOAP web services for clients that are application
> programs, not browsers.
>
> For my runtime, I have installed "Zend Core for IBM 2.0.3" (Apache 2.2.2,
> PHP 5.2.3, and Zend Debugger 5.2.9). For my IDE, I have installed
> "Eclipse PDT all-in-one-incubation S20070910 RC1".
>
> When the Eclipse "Debug As -> PHP Web Page" action invokes PHP scripts
> with a browser, the PDT Debugger works as expected: the Debugger stops at
> breakpoints in PHP scripts, and the browser receives the output of the
> scripts.
>
> But when an application program (such as a Java or C program, or the
> "wget" or "curl" command) invokes the same scripts with the same URLs,
> they don't appear to execute at all: the PDT Debugger does not stop on
> breakpoints in PHP scripts, and the clients receive no output from the
> scripts (that is, the content of HTTP response messages is empty).
>
> The Eclipse "Debug As -> PHP Web Page" action launches browsers with a URL
> that contains a lot of debugger-related arguments, like this:
>
> http://localhost/whatever/index.php
> ?debug_session_id=1005
> &start_debug=1
> &debug_start_session=1
> &debug_host=9.2.26.33%2C127.0.0.1
> &debug_no_cache=1189699647453
> &debug_port=10000
> &send_sess_end=1
> &original_url=http://localhost/whatever/index.php
> &debug_stop=1
>
> I have not found any documentation on these debugger-related arguments, or
> the debugging protocol used on port 10000.
>
> How can application programs written in Java or C invoke PHP scripts with
> URLs like these so that the PDT Debugger will work?
>
> -- Edward Pring <pring@us.ibm.com>
Check out the following link:
http://www.eclipse.org/pdt/documents/PDT%20-%20Debug%20Proto col.pdf
This is the protocol for the Zend Debugger. Hopefully, that will be a good
start for you. I have not dealt with Zend Debugger too much, but the
document looks impressive (not as much as xDebug, mind you)
Schreck
|
|
|
Re: how to use the PDT Debugger with application programs instead of browsers? [message #51833 is a reply to message #51326] |
Fri, 14 September 2007 18:56 |
Edward Pring Messages: 9 Registered: July 2009 |
Junior Member |
|
|
Jason Schreckengost wrote:
> "Edward Pring" <pring@us.ibm.com> wrote in message
> news:fcbvrf$q02$1@build.eclipse.org...
>> I'm trying to use the Zend PDT Debugger to debug PHP scripts that
>> implement REST and SOAP web services for clients that are application
>> programs, not browsers.
>>
>> For my runtime, I have installed "Zend Core for IBM 2.0.3" (Apache 2.2.2,
>> PHP 5.2.3, and Zend Debugger 5.2.9). For my IDE, I have installed
>> "Eclipse PDT all-in-one-incubation S20070910 RC1".
>>
>> When the Eclipse "Debug As -> PHP Web Page" action invokes PHP scripts
>> with a browser, the PDT Debugger works as expected: the Debugger stops at
>> breakpoints in PHP scripts, and the browser receives the output of the
>> scripts.
>>
>> But when an application program (such as a Java or C program, or the
>> "wget" or "curl" command) invokes the same scripts with the same URLs,
>> they don't appear to execute at all: the PDT Debugger does not stop on
>> breakpoints in PHP scripts, and the clients receive no output from the
>> scripts (that is, the content of HTTP response messages is empty).
>>
>> The Eclipse "Debug As -> PHP Web Page" action launches browsers with a URL
>> that contains a lot of debugger-related arguments, like this:
>>
>> http://localhost/whatever/index.php
>> ?debug_session_id=1005
>> &start_debug=1
>> &debug_start_session=1
>> &debug_host=9.2.26.33%2C127.0.0.1
>> &debug_no_cache=1189699647453
>> &debug_port=10000
>> &send_sess_end=1
>> &original_url=http://localhost/whatever/index.php
>> &debug_stop=1
>>
>> I have not found any documentation on these debugger-related arguments, or
>> the debugging protocol used on port 10000.
>>
>> How can application programs written in Java or C invoke PHP scripts with
>> URLs like these so that the PDT Debugger will work?
>>
>> -- Edward Pring <pring@us.ibm.com>
>
> Check out the following link:
> http://www.eclipse.org/pdt/documents/PDT%20-%20Debug%20Proto col.pdf
>
> This is the protocol for the Zend Debugger. Hopefully, that will be a good
> start for you. I have not dealt with Zend Debugger too much, but the
> document looks impressive (not as much as xDebug, mind you)
>
> Schreck
>
>
Thanks for the pointer. This document lists the debugger-related
arguments (the table appears on page 5, under the heading "4.1. Data
Types:", but it should be on page 4, under the heading "3.2 HTTP
Parameters"). But it does not describe how the PDT Debugger uses them.
The rest of the document describes the binary messages exchanged between
the PHP engine (called the "server" in this document) and the PDT
Debugger (called the "client"). It does not describe how to start a PDT
Debugger session without invoking a browser, or how an application
program can cause a PHP engine to connect to the PDT Debugger.
-- Ed
|
|
|
Re: how to use the PDT Debugger with application programs instead of browsers? [message #51860 is a reply to message #51833] |
Fri, 14 September 2007 19:19 |
D Kelsey Messages: 232 Registered: July 2009 |
Senior Member |
|
|
I am not sure how the zend debugger within PDT is implemented exactly but if
it is like the xdebug implementation, unless there is a valid PDT launch being
done, any external connection from the debugger (server side) is ignored.
So if you for example just send the URL to a web server, the zend debugger may
attempt to connect to PDT but as there is no associated launch, the connection
is rejected.
I don't know if this is the case for zend, but this is how the xdebug implementation works.
Dave Kelsey
Edward Pring wrote:
> Jason Schreckengost wrote:
>> "Edward Pring" <pring@us.ibm.com> wrote in message
>> news:fcbvrf$q02$1@build.eclipse.org...
>>> I'm trying to use the Zend PDT Debugger to debug PHP scripts that
>>> implement REST and SOAP web services for clients that are application
>>> programs, not browsers.
>>>
>>> For my runtime, I have installed "Zend Core for IBM 2.0.3" (Apache
>>> 2.2.2, PHP 5.2.3, and Zend Debugger 5.2.9). For my IDE, I have
>>> installed "Eclipse PDT all-in-one-incubation S20070910 RC1".
>>>
>>> When the Eclipse "Debug As -> PHP Web Page" action invokes PHP
>>> scripts with a browser, the PDT Debugger works as expected: the
>>> Debugger stops at breakpoints in PHP scripts, and the browser
>>> receives the output of the scripts.
>>>
>>> But when an application program (such as a Java or C program, or the
>>> "wget" or "curl" command) invokes the same scripts with the same
>>> URLs, they don't appear to execute at all: the PDT Debugger does not
>>> stop on breakpoints in PHP scripts, and the clients receive no output
>>> from the scripts (that is, the content of HTTP response messages is
>>> empty).
>>>
>>> The Eclipse "Debug As -> PHP Web Page" action launches browsers with
>>> a URL that contains a lot of debugger-related arguments, like this:
>>>
>>> http://localhost/whatever/index.php
>>> ?debug_session_id=1005
>>> &start_debug=1
>>> &debug_start_session=1
>>> &debug_host=9.2.26.33%2C127.0.0.1
>>> &debug_no_cache=1189699647453
>>> &debug_port=10000
>>> &send_sess_end=1
>>> &original_url=http://localhost/whatever/index.php
>>> &debug_stop=1
>>>
>>> I have not found any documentation on these debugger-related
>>> arguments, or the debugging protocol used on port 10000.
>>>
>>> How can application programs written in Java or C invoke PHP scripts
>>> with URLs like these so that the PDT Debugger will work?
>>>
>>> -- Edward Pring <pring@us.ibm.com>
>>
>> Check out the following link:
>> http://www.eclipse.org/pdt/documents/PDT%20-%20Debug%20Proto col.pdf
>>
>> This is the protocol for the Zend Debugger. Hopefully, that will be a
>> good start for you. I have not dealt with Zend Debugger too much, but
>> the document looks impressive (not as much as xDebug, mind you)
>>
>> Schreck
>>
>
> Thanks for the pointer. This document lists the debugger-related
> arguments (the table appears on page 5, under the heading "4.1. Data
> Types:", but it should be on page 4, under the heading "3.2 HTTP
> Parameters"). But it does not describe how the PDT Debugger uses them.
>
> The rest of the document describes the binary messages exchanged between
> the PHP engine (called the "server" in this document) and the PDT
> Debugger (called the "client"). It does not describe how to start a PDT
> Debugger session without invoking a browser, or how an application
> program can cause a PHP engine to connect to the PDT Debugger.
>
> -- Ed
|
|
|
Goto Forum:
Current Time: Tue Dec 03 17:15:33 GMT 2024
Powered by FUDForum. Page generated in 0.03364 seconds
|