PHP Eclipse / PHP DBG : CLI debugging capabilities ?

Author Message

Sébastien Landeau

Wednesday 17 May 2006 11:01:33 am

I'm developping under Eclipse with the PHP Eclipse plugin.
I have the PHP DBG extension.

Eclipse debugger (and PHP DBG) works well in remote debug mode, by includind HTTP parameter DBGSESSID=1@localhost:10001 in page URLs (some RewriteRule in the Apache configuration can help sometimes).

But I can't debug in PHP CLI mode, for my ez Scripts.
The Eclipse debugger doesn't stop at breakpoints :-(

Does somebody have some experience with PHP CLI Debugging ?

Thank's a lot...

Xavier Dutoit

Wednesday 17 May 2006 11:34:57 pm

I don't.

Could you give us more infos about the rewrite rules you mention ?

X+

http://www.sydesy.com

Sébastien Landeau

Wednesday 17 May 2006 11:59:34 pm

The RewriteRule I use in my Apache configuration is :

<b>RewriteRule (.*).php $1.php?DBGSESSID=1@clienthost:10001 [QSA]</b>

It's rewrite all php URLs and update the query string (QSA option) with the Php DBG parameters.

So if you configure the Eclipse PHP Debugger in remote mode (on port 10001), your code stops at breakpoints, and you will get all eclipse debugging capabilities !! ;-)

But it doesn't work in php CLI mode... :-(

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:26:40
Script start
Timing: Jan 31 2025 01:26:40
Module start 'layout'
Timing: Jan 31 2025 01:26:40
Module start 'content'
Timing: Jan 31 2025 01:26:40
Module end 'content'
Timing: Jan 31 2025 01:26:40
Script end

Main resources:

Total runtime0.0236 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.2656151.2266
Module start 'layout' 0.00620.0044 739.4922220.7188
Module start 'content' 0.01060.0116 960.2109997.8359
Module end 'content' 0.02220.0013 1,958.046933.9922
Script end 0.0235  1,992.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003113.0439140.0002
Check MTime0.00114.7943140.0001
Mysql Total
Database connection0.00073.075210.0007
Mysqli_queries0.003314.204830.0011
Looping result0.00000.054610.0000
Template Total0.00104.110.0010
Template load0.00073.104510.0007
Template processing0.00020.945510.0002
Override
Cache load0.00052.252010.0005
General
dbfile0.00021.052780.0000
String conversion0.00000.029340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs