php-windows Digest 13 Oct 2010 10:27:14 -0000 Issue 3867
Topics (messages 30347 through 30351):
Re: Line by line debugger for PHP for command line work.
30347 by: Steven Scott
30348 by: Richard Quadling
30349 by: æ æ°å®¸
30350 by: Richard Quadling
30351 by: Tommy Pham
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
XDebug is a common tool, and can link with most IDEs. There is also
FirePHP plugin if you are using Firefox.
On Tue, Oct 12, 2010 at 8:47 AM, Richard Quadling <rquadl...@gmail.com> wrote:
> Hi.
>
> I'm trying to trawl my way through a load of code I've been dumped
> with. It is a mixture of VERY BIG functions and a load of classes with
> really bad names. A mess. The code runs on PHP5, but there are some
> errors in the output which I can't find. No authors are contactable
> (they no longer work here and I'm not even sure you could say they
> ever did!).
>
> It is for command line use only. So something that can hook into my
> PHP (I'm using 5.3.4-dev).
>
> I need a debugging tool to allow me to step through the code line by
> line looking at the call stack, globals, locals etc.
>
> Regards,
>
> Richard.
>
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On 12 October 2010 14:09, Steven Scott <chowarm...@gmail.com> wrote:
> XDebug is a common tool, and can link with most IDEs. There is also
> FirePHP plugin if you are using Firefox.
>
> On Tue, Oct 12, 2010 at 8:47 AM, Richard Quadling <rquadl...@gmail.com> wrote:
>> Hi.
>>
>> I'm trying to trawl my way through a load of code I've been dumped
>> with. It is a mixture of VERY BIG functions and a load of classes with
>> really bad names. A mess. The code runs on PHP5, but there are some
>> errors in the output which I can't find. No authors are contactable
>> (they no longer work here and I'm not even sure you could say they
>> ever did!).
>>
>> It is for command line use only. So something that can hook into my
>> PHP (I'm using 5.3.4-dev).
>>
>> I need a debugging tool to allow me to step through the code line by
>> line looking at the call stack, globals, locals etc.
>>
>> Regards,
>>
>> Richard.
>>
>> --
>> Richard Quadling
>> Twitter : EE : Zend
>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
Aha. Just getting XDebug in. I see it can talk to a remote debugger
... I've got WinDbg installed ... Going to see if that'll do what I
want.
FirePHP would be no good for command line scripts I'd suspect?
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--- End Message ---
--- Begin Message ---
Hi:
xdebug and vim with dbgp
plugin(http://www.vim.org/scripts/script.php?script_id=1929) can satsfy
your needs.
there is also a manual(http://www.laruence.com/2010/06/21/1608.html
) if you can speak chinese .
惠新宸 laruence
Mail: huixinc...@baidu.com
Tel : +86 010 5992-6238
http://www.laruence.com/
On 10/12/2010 21:09, Steven Scott wrote:
XDebug is a common tool, and can link with most IDEs. There is also
FirePHP plugin if you are using Firefox.
On Tue, Oct 12, 2010 at 8:47 AM, Richard Quadling<rquadl...@gmail.com> wrote:
Hi.
I'm trying to trawl my way through a load of code I've been dumped
with. It is a mixture of VERY BIG functions and a load of classes with
really bad names. A mess. The code runs on PHP5, but there are some
errors in the output which I can't find. No authors are contactable
(they no longer work here and I'm not even sure you could say they
ever did!).
It is for command line use only. So something that can hook into my
PHP (I'm using 5.3.4-dev).
I need a debugging tool to allow me to step through the code line by
line looking at the call stack, globals, locals etc.
Regards,
Richard.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
--- End Message ---
--- Begin Message ---
On 12 October 2010 14:58, 惠新宸 <huixinc...@baidu.com> wrote:
> Hi:
> xdebug and vim with dbgp
> plugin(http://www.vim.org/scripts/script.php?script_id=1929) can satsfy your
> needs.
>
> there is also a manual(http://www.laruence.com/2010/06/21/1608.html
> ) if you can speak chinese .
>
>
> 惠新宸 laruence
> Mail: huixinc...@baidu.com
> Tel : +86 010 5992-6238
> http://www.laruence.com/
我不讲中文,而是感谢您您的提议。
or should I have said
我不讲中文,而是感謝您您的提議。
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Richard Quadling [mailto:rquadl...@gmail.com]
> Sent: Tuesday, October 12, 2010 7:04 AM
> To: 惠新宸
> Cc: php-wind...@lists.php.net
> Subject: Re: [PHP-WIN] Line by line debugger for PHP for command line
> work.
>
> On 12 October 2010 14:58, 惠新宸 <huixinc...@baidu.com> wrote:
> > Hi:
> > xdebug and vim with dbgp
> > plugin(http://www.vim.org/scripts/script.php?script_id=1929) can
> > satsfy your needs.
> >
> > there is also a manual(http://www.laruence.com/2010/06/21/1608.html
> > ) if you can speak chinese .
> >
> >
> > 惠新宸 laruence
> > Mail: huixinc...@baidu.com
> > Tel : +86 010 5992-6238
> > http://www.laruence.com/
>
> 我不讲中文,而是感谢您您的提议。
>
> or should I have said
>
> 我不讲中文,而是感謝您您的提議。
>
>
>
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
Or you could use what I made a while back. Adjust the output according to your
need. You can leave the echo to view on screen or write it to file and
download that file for offsite/offline review/debug. This should give you all
internals working of the script/app without you having to wade through all that
mess...
<?php
echo '<pre style="text-align: left;">';
$loadedExtensions = get_loaded_extensions();
//echo '$loadedExtensions » ';
//print_r($loadedExtensions);
$requiredFiles = get_required_files();
echo '$requiredFiles » ';
print_r($requiredFiles);
$includedFiles = get_included_files();
echo '$includedFiles » ';
print_r($includedFiles);
$definedConstants = get_defined_constants(true);
foreach($loadedExtensions as $extensionName)
{
unset($definedConstants[$extensionName]);
}
echo '$definedConstants » ';
print_r($definedConstants);
$definedVars = get_defined_vars();
unset($definedVars['GLOBALS'], $definedVars['_POST'], $definedVars['_GET'],
$definedVars['_COOKIE'], $definedVars['_FILES'], $definedVars['_ENV'],
$definedVars['_REQUEST'], $definedVars['_SERVER'],
$definedVars['loadedExtensions'], $definedVars['extensionName'],
$definedVars['requiredFiles'], $definedVars['includedFiles'],
$definedVars['declaredInterfaces'], $definedVars['declaredClasses'],
$definedVars['definedConstants'], $definedVars['definedFunctions']);
echo '$definedVars » ';
print_r($definedVars);
$definedFunctions = get_defined_functions();
unset($definedFunctions['internal']);
echo '$definedFunctions » ';
print_r($definedFunctions);
$declaredInterfaces = get_declared_interfaces();
// remove PHP's internal interfaces ... adjust according to extensions loaded
$declaredInterfaces = array_slice($declaredInterfaces, 12);
echo '$declaredInterfaces » ';
print_r($declaredInterfaces);
$declaredClasses = get_declared_classes();
// remove PHP's internal classes ... adjust according to extensions loaded
$declaredClasses = array_slice($declaredClasses, 133);
echo '$declaredClasses » ';
print_r($declaredClasses);
foreach ($declaredClasses as $className)
{
$reflect = new ReflectionClass($className);
echo '<hr />';
echo $reflect;
}
echo '</pre>';
?>
Regards,
Tommy
--- End Message ---