[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.pdt] Re: Simple script terminates when I try to debug it.

Dave,

I have attached the log.

My Debug Configuration is a "PHP Script", not a "PHP Web Page" - so does the port 9000 issue matter? When I exit Eclipse, netstat no longer lists 9000 or 10000 as open, so I would think that is not the problem.

I created a "PHP Web Page" Configuration to see if the debugger would work for a Web configuration. For Web configurations, my installation of Eclipse uses a different PHP executable (the one that is in Apache/bin instead of the one in my PHP directory). When I run the Web configuration, the external browser loads with the script output, but the debugger does not show the current execution line or halt on a breakpoint (but the debug session does not immediately terminate as with the "PHP Script" configuration.

I added phpinfo(), and the XDebug setting are in the phpinfo output(see listing below).

I wonder what else could cause the Debug system to not suspend on a breakpoint?

Thanks,

Dave



phpinfo() output:


xdebug

xdebug support => enabled
Version => 2.0.3

Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.125.2.4 $
GDB - GNU Debugger protocol => $Revision: 1.87 $
PHP3 - PHP 3 Debugger protocol => $Revision: 1.22 $

Directive => Local Value => Master Value
xdebug.auto_trace => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.extended_info => On => On
xdebug.idekey => ECLIPSE_DBGP => no value
xdebug.manual_url => http://www.php.net => http://www.php.net
xdebug.max_nesting_level => 100 => 100
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => On => On
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => G:\xampp\tmp => G:\xampp\tmp
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => Off => Off
xdebug.remote_enable => On => On
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => 127.0.0.1 => 127.0.0.1
xdebug.remote_log => g:\xampp\xdebug_exe.log => g:\xampp\xdebug_exe.log
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => Off => Off
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /tmp => /tmp
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3



Thanks,

Dave


Dave Kelsey wrote:
could you add
xdebug.remote_log="c:\xdebug_exe.log"

and post the contents of the log. Another thing worth trying is adding the line
phpinfo();
to your script and check that all the xdebug stuff is as it should be.
Also check that no firewalls are blocking port 9000 and nothing else listening on port 9000 (ie before you start PDT do a netstat -a | find "LISTENING", and after starting PDT do a netstat -a | find "LISTENING"), although PDT should report a problem in the error log at least if it cannot bind to port 9000


Dave Kelsey


Dave Connerth wrote:
I am trying to get XDebug to work.

I have written the following simple script:

<?php
$name = "world";
for ($i = 0; $i >100; $i++ ){
    print("Hello, $name ($i)!\n");
}
?>

When I execute the Eclipse Debug, I get an immediate:

    <terminated> PHP Application
    <terminated, exit value:1>G:\xampp\php\php.exe

in the Debug View. The system does not suspend on the first line of PHP code as I would expect, given that the Debug configuration specifies to do so.

Debug Configuration Settings:

debugger=Xdebug
exe=G:\xampp\php\php.exe
file=/simpleDebugExample/helloworld.php
break at first line=checked

php -m lists XDebug as installed

XDebug Settings:
port=9000
show super globals=checked
max array debth=3
max children=31
use multisession=not checked
accept remote session=off
output capture=off
stderr=copy
use proxy=not checked
step filtering=not checked
multi debug sessions=Prompt
Switch back to PHP Perspective=Never
Open in browser=not checked
Open debug views=not checked

PDT Plugin version: 2.0.0.v20081229-1135
WST version: 3.0.3.v200809250443

php.ini settings (note I commented out the [Zend] settings):

[Zend]
;zend_extension_ts = "G:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "G:\xampp\php\zendOptimizer\lib\Optimizer"
;zend_optimizer.enable_loader = 0
;zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
; Local Variables:
; tab-width: 4
; End:


[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="G:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="G:\xampp\tmp"


max_execution_time = 600; max_input_time = 600; memory_limit = 32M;


cachegrind.out file: version: 0.9.6 cmd: Z:\Workspace\simpleDebugExample\helloworld.php part: 1

events: Time

fl=Z:\Workspace\simpleDebugExample\helloworld.php
fn={main}

summary: 30162

0 30162

ANY HELP IS GREATLY APPRECIATED!!


Log opened at 2009-02-11 05:57:37
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; fileuri="file:///Z:/Workspace/simpleDebugExample/helloworld.php" language="PHP" protocol_version="1.0" appid="2736" session="12343318577505" idekey="ECLIPSE_DBGP"><engine version="2.0.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2008 by Derick Rethans]]></copyright></init>

<- feature_set -i 39 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_set" transaction_id="39" feature="show_hidden" success="1"></response>

<- feature_set -i 40 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_set" transaction_id="40" feature="max_depth" success="1"></response>

<- feature_set -i 41 -n max_children -v 31
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_set" transaction_id="41" feature="max_children" success="1"></response>

<- feature_get -i 42 -n encoding
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_get" transaction_id="42" feature_name="encoding" supported="1"><![CDATA[iso-8859-1]]></response>

<- feature_get -i 43 -n supports_async
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_get" transaction_id="43" feature_name="supports_async" supported="1"><![CDATA[0]]></response>

<- stdout -i 44 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="stdout" transaction_id="44" success="0"></response>

<- stderr -i 45 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="stderr" transaction_id="45" success="0"></response>

<- step_into -i 46
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="step_into" transaction_id="46" status="stopping" reason="ok"></response>

<- stop -i 47
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="stop" transaction_id="47" status="stopped" reason="ok"></response>

Log closed at 2009-02-11 05:57:38

Log opened at 2009-02-11 05:59:03
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; fileuri="file:///Z:/Workspace/simpleDebugExample/helloworld.php" language="PHP" protocol_version="1.0" appid="1204" session="12343319428596" idekey="ECLIPSE_DBGP"><engine version="2.0.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2008 by Derick Rethans]]></copyright></init>

<- feature_set -i 48 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_set" transaction_id="48" feature="show_hidden" success="1"></response>

<- feature_set -i 49 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_set" transaction_id="49" feature="max_depth" success="1"></response>

<- feature_set -i 50 -n max_children -v 31
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_set" transaction_id="50" feature="max_children" success="1"></response>

<- feature_get -i 51 -n encoding
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_get" transaction_id="51" feature_name="encoding" supported="1"><![CDATA[iso-8859-1]]></response>

<- feature_get -i 52 -n supports_async
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="feature_get" transaction_id="52" feature_name="supports_async" supported="1"><![CDATA[0]]></response>

<- stdout -i 53 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="stdout" transaction_id="53" success="0"></response>

<- stderr -i 54 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="stderr" transaction_id="54" success="0"></response>

<- step_into -i 55
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="step_into" transaction_id="55" status="stopping" reason="ok"></response>

<- stop -i 56
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"; command="stop" transaction_id="56" status="stopped" reason="ok"></response>

Log closed at 2009-02-11 05:59:03