Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » [Solved] The old chestnut: xdebug not stopping at breakpoints
[Solved] The old chestnut: xdebug not stopping at breakpoints [message #1063656] Thu, 13 June 2013 11:40 Go to next message
Richard Brignall is currently offline Richard Brignall
Messages: 4
Registered: June 2013
Junior Member
Sorry, I know there are hunderds of answers on the web and I think I've read them all in the last 2 days but I still cannot get this to work since updating from an old version on Fedora to Indigo (3.7) on Ubuntu 12.04.

I have php5.3

This is my xdebug.ini:
root@elina:/etc# cat /etc/php5/conf.d/xdebug.ini
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

xdebug.remote_enable=on
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=

; to enable remote debugging
zend_debugger.allow_hosts=127.0.0.1/32
zend_debugger.expose_remotely=always


xdebug is at the specified location

In eclipse I have a timy little script:
<?php

$name='world';
for($i = 0; $i < 100; $i++):
	print("Hello, $name ($i)!\n");
endfor;

with a breakpoint on the "for()"
and these settings
index.php/fa/15258/0/
index.php/fa/15259/0/
index.php/fa/15260/0/
index.php/fa/15261/0/

and when I run the debug it just sails through to the end showing 99 line in the console.

Please, please what have i done wrong?
  • Attachment: xd1.jpeg
    (Size: 24.45KB, Downloaded 555 times)
  • Attachment: xd2.jpeg
    (Size: 12.03KB, Downloaded 547 times)
  • Attachment: xd3.jpeg
    (Size: 32.08KB, Downloaded 549 times)
  • Attachment: xd4.jpeg
    (Size: 34.01KB, Downloaded 539 times)

[Updated on: Mon, 17 June 2013 04:06]

Report message to a moderator

Re: The old chestnut: xdebug not stopping at breakpoints [message #1063735 is a reply to message #1063656] Thu, 13 June 2013 18:53 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro Izumi
Messages: 344
Registered: July 2009
Location: Japan
Senior Member
>Indigo (3.7) on Ubuntu 12.04.
If you're using older version of PDT, see Bug 347618 Additional PHP .ini files not parsed.
(latest PDT 3.1.2 (in juno repository) doesn't have this problem)
Re: The old chestnut: xdebug not stopping at breakpoints [message #1063772 is a reply to message #1063735] Fri, 14 June 2013 03:58 Go to previous messageGo to next message
Richard Brignall is currently offline Richard Brignall
Messages: 4
Registered: June 2013
Junior Member
THanks for the comment.

I,ve installed Juno:
Eclipse SDK

Version: 4.2.2
Build id: M20130204-1200


reconfigured as in my first post and it still runs to the end ignoring both "break at start" and set breakpoints.

Do I have to move the contents of xdebug.ini into php.ini?
Re: The old chestnut: xdebug not stopping at breakpoints [message #1063844 is a reply to message #1063772] Fri, 14 June 2013 09:09 Go to previous messageGo to next message
Richard Brignall is currently offline Richard Brignall
Messages: 4
Registered: June 2013
Junior Member
A bit more information.
I've updated xdebug to the latest version and added logging to file to the config. It still does not stop at breakpoints but the debugger does seem to be correctly connected.

Here is the start of the xdebugger log file. I don't fully understand it but it does seem to report that a breakpoint is set in my little bit of code.

Attached is the log file. The forum will not let me post it here

For what it's worth I've also installed netbeans and tried to debug the same bit of code and that also does not stop.

Any ideas would be gratefully accepted.
  • Attachment: xdebug.log
    (Size: 19.75KB, Downloaded 53 times)

[Updated on: Fri, 14 June 2013 09:10]

Report message to a moderator

[SOLVED] Re: The old chestnut: xdebug not stopping at breakpoints [message #1063994 is a reply to message #1063844] Mon, 17 June 2013 04:05 Go to previous message
Richard Brignall is currently offline Richard Brignall
Messages: 4
Registered: June 2013
Junior Member
I had Zend Debugger included within the php.ini (as a separate .ini file) Although Eclipse was configured to use xdebug it seems that the presence of zend debugger interferes with xdebug.

I also read that zend debugger will not work if php has been configured with the suhosin hardening extension.

Anyway, removing zend from the ini, restarting apache made it work. This was the ini file I ended up with:
$ cat xdebug.ini 
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

xdebug.remote_enable=on
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=

; to enable remote debugging
 zend_debugger.allow_hosts=127.0.0.1/32
 zend_debugger.expose_remotely=always

;xdebug.remote_log=/path/to/xdebug.log



Optionally one can uncomment the log line and set the path to a log file but remember that xdebug APPENDS to the log file so it could grow huge.
Previous Topic:Usage of xdebug.file_link_format
Next Topic:PHPUnit and Eclipse Helios Integration - console output with --colors argument
Goto Forum:
  


Current Time: Fri Aug 01 04:09:20 EDT 2014

Powered by FUDForum. Page generated in 0.02401 seconds