[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.php] Re: Problems with PDT and Xdebug

Dave Kelsey wrote:
The reason is that you have the debug port for the zend debugger and the
debug port for xdebug in PDT both set to 9000. This won't work.
PDT starts listening on port 9000 straight away for zend debug type connections
and so this stops xdebug from ever being able to see the connections.
You need to make sure that they are different. I recommend setting the
Debug port under Workspace options to say 10000 and leave the XDebug
port at 9000.


Dave Kelsey


IchBin wrote:
IchBin wrote:
Dave Kelsey wrote:
Debug with PHP script or Run as PHP Web page are launching your script to
work with the zend debugger.


Can you check that you haven't configured both the zend debugger and xdebug
to use the same port (by default zend use 10000, XDebug uses 9000). They
cannot be configured to the correct port.


Dave Kelsey


IchBin wrote:
I have installed a separate Eclipse and a new workspace for testing the installed products on Windows XP SP2:

- pdt-all-in-one-S20070130_RC2-win32
- Prebuilt Binary of XDebug With Path Mapper V0.1.3 (PDT RC2)
  [org.eclipse.php.xdebug.y.updatesite.zip]
- php 5.2.1-dev
- php_xdebug-2.0.0rc3-5.2.1

I created a test php script which just issues a phpinfo().

*Problems* when running this script:

- If I "Run as or Debug as PHP Script" I get these two error response windows:

  "Error launching 'phpinfo'
  The debug session could not be started. Please make sure that the
  debugger is properly configured.

  "Debugger Error"
  Incompatible Debug Server version. Probably the remote debugger
  protocol does not match the expected protocol version (2006040701)

- If I "Run as PHP Web Page" I get one error response window but it does open up my Opera and displays the phpinfo data. It will on display in Opera only the first time I run it. After that nothing will open up in my default browser. This is the error:

  "Debugger Error"
  Incompatible Debug Server version. Probably the remote debugger
  protocol does not match the expected protocol version (2006040701)

- If I "Run as PHP Script using Xdebug" It Open my browser and submits this URL: http://localhost/test/phpinfo.php?XDEBUG_SESSION_START=ECLIPSE_XDEBUG&KEY=11717361998921


But I get this back from Apache Server:

"Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/2.0.59 (Win32) mod_jk/1.2.15 SVN/1.4.0 PHP/5.2.1-dev DAV/2 Server at localhost Port 80"


I know that XDebug works with my Instance of Apache because I can run two other IDES' (tsWebEditor and PHP edit) that user Xdebug and they work without any problem.


Well the debug port and the Xdebug port are set to 9000. I attached a jpg of PREFERENCES\PHP\DEBUG.. I have renamed the ZendDebugger.dll so it can not be referenced.


I use to use Zend debugger but have deleted it. This is why I built a new install of Eclipse, PDT and Xdebug. I am even running out of a new workspace just in case their could be any residual code or reference in the workspace\.metadata\.plugins.

Here is my apache config for debuggers:

[Zend debugger]
;zend_extension_ts=C:/PHP/EXT/ZendDebugger.dll
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
zend_debugger.connector_port=10000
;_______________________________________________________________________( debugger)


[DBG debugger]
;extension=php_dbg.dll
debugger.enabled = true
debugger.profiler_enabled = true
debugger.JIT_enabled = true
debugger.JIT_host = clienthost
debugger.JIT_port = 7869

;debugger.hosts_allow=localhost
;debugger.hosts_deny=ALL
;debugger.ports=7869, 10000/16
;______________________________________________________________________( xdebug)


[xdebug]
;non debug build that has thread safety
zend_extension_ts="c:\php\ext\php_xdebug-2.0.0rc3-5.2.1.dll"

;REMOTE DEBUGGER SETTINGS
xdebug.remote_autostart=On ;(default: Off)
xdebug.remote_enable=On ;(default: Off)
xdebug.remote_handler=dbgp ;(default: gdb) replaced 'dbgp'
xdebug.remote_mode=req ;(default: req)
xdebug.remote_host=localhost ;(default: localhost) changeed from foo.bar.com
xdebug.remote_port=9000 ;(default: 17869 for Xdebug 1.3 or 9000 for Xdebug 2.x)
xdebug.idekey=kyla ;(default: *complex*)


; All settings from Documentation
xdebug.auto_trace=off                ;(default: Off)

xdebug.collect_includes=On            ;(default: On) (Xdebug 2)
xdebug.collect_params=Off            ;(default: Off)
xdebug.collect_return=off             ;(default: Off)
xdebug.default_enable=On             ;(default: Off)

xdebug.extended_info=1 ;(default: 1)
xdebug.manual_url=http://www.php.net ;(default: http://www.php.net)
xdebug.show_local_vars=1 ;(default: 0) (Xdebug 2)
xdebug.show_mem_delta=1 ;(default: 0)
xdebug.max_nesting_level=100 ;(default: 64 in Xdebug 1, 100 in Xdebug 2)


xdebug.trace_format=0 ;(default: 0) (Xdebug 2)
xdebug.trace_output_dir=/wwwroot/XDebug/trace_output ;[string] (default: /tmp) (Xdebug 2)
xdebug.trace_options=0 ;(default: 0) (Xdebug 2)
xdebug.trace_output_name=crc32 ;(default: crc32) (Xdebug 2)


;PROFILER SETTINGS (Xdebug 1)
;xdebug.auto_profile=On ;(default: Off) (Xdebug 1)
;xdebug.auto_profile_mode=0 ;(default: 0) (Xdebug 1)
;xdebug.output_dir=/wwwroot/XDebug/profiler_output ;[string] (default: /tmp) (Xdebug 1)


;PROFILER SETTINGS (Xdebug 2)
xdebug.profiler_append=1 ;(default: 0) (Xdebug 2)
xdebug.profiler_enable=0 ;(default: 0) (Xdebug 2)
xdebug.profiler_output_dir=/wwwroot/XDebug/profiler_output ;(default: /tmp) (Xdebug 2)
xdebug.profiler_output_name=crc32 ;(default: crc32) (Xdebug 2);
xdebug.profile_enable_trigger=0 ;(default: 0) (Xdebug 2)


;SUPERGLOBAL DUMPING SETTINGS
;xdebug.dump.COOKIE [string]            ;(default: Empty)
;xdebug.dump.ENV [string]            ;(default: Empty)
;xdebug.dump.FILES [string]            ;(default: Empty)
;xdebug.dump.GET [string)            ;(default: Empty)
;xdebug.dump.POST [string]            ;(default: Empty)
;xdebug.dump.REQUEST [string]        ;(default: Empty)
;xdebug.dump.SERVER [string]            ;(default: Empty)
;xdebug.dump.SESSION [string]        ;(default: Empty)

xdebug.dump_once=on                    ;(default: On)
xdebug.dump_undefined=off            ;(default: Off)
xdebug.dump_globals=1


------------------------------------------------------------------------


I just noticed that If I "Run as PHP Script using Xdebug" It Opens my browser and submits this URL: http://localhost/test/phpinfo.php?XDEBUG_SESSION_START=ECLIPSE_XDEBUG&KEY=11717361998921



This was a wrong URL. If I correct this I do not get the apache error and the phpinfo displays but get below error and does not stop at first script instruction to debug:


  "Debugger Error"
  Incompatible Debug Server version. Probably the remote debugger
  protocol does not match the expected protocol version (2006040701)


Thanks Dave, I did not understand that about the ports. I have changed and this is what I see:


- If I "Run PHP Script" I can not have the "Run With Debug Info" checked else I get this error:

  "Error launching 'phpinfo' The debug session could not be started.
   Please make sure the debugger is properly configured.


- If I "Run PHP Script" with "Run With Debug Info" not checked it runs but all output is written to the console tab. I am not sure if that is the correct behavior.



- No problems with "Run as PHP Web Page".


- If I "Debug as PHP Script" and it defaults to "Brake at first line" I get this error:


  "Error launching 'phpinfo' The debug session could not be started.
   Please make sure the debugger is properly configured.


- If I "Debug as PHP Web Page" and I put a STOP on the line that issues the 'phpinfo()' command. It just displays the output in a tab next to the program source tabs. The PHP Debug perspective does even open up.



- If I "Debug as Web Script with Xdebug" and it defaults to "Brake at first line" a new "Internal Web Browser" tab open up down alongside of the console tab. It just stays there with the red button saying it is running but nothing happens. I do not see a URL in the input line for the internal web browser.


--
Thanks in Advance...           http://weconsultants.prophp.org
IchBin, Pocono Lake, Pa, USA   http://ichbinquotations.awardspace.com
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)