3

I am able to debug only if I check the Option "Break at First line". If I un-check it and place a breakpoint at some line then the debugger doesn't stop at that line.

I need the debugger to stop at the breakpoints I set, not at the fist line of the file.

I've added the following lines in my php.ini file:

zend_extension = "c:/wamp/bin/php/php5.3.8/ext/php_xdebug-2.1.2-5.3-vc9.dll"
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9000

I'm also being able to debug properly on Notepad++ DBGp debugger with this same setting.

There are similar posts on SO but none solves my problem. In SO question "Can not make PHP PDT xDebug to stop at breakpoints in Eclipse", DevNull says the problem was solved for Juno, but I'm using Juno myself and having the problem.

Here are some screenshots of my Eclipse settings:

  • Window --> Preferences --> PHP --> Debug: enter image description here
  • Window --> Preferences --> PHP --> PHP Executables: enter image description here
  • Window --> Preferences --> PHP --> PHP Executables --> Execution Environment: enter image description here
  • Window --> Preferences --> PHP --> PHP Interpreters:

    enter image description here

  • Window --> Preferences --> PHP --> PHP Servers: enter image description here
  • I'm using Mozilla Firefox as my external web browser. (Window --> General --> Web Browser)

  • The Project Debug Configuration --> PHP Web Application --> Debugger --> Server Debugger is set to XDebug and XDebug debug port is set to 9000
  • Hope those will help someone help me.

    Community
    • 1
    • 1
    Tariq M Nasim
    • 1,278
    • 11
    • 24

    2 Answers2

    3

    May be you should try to upgrade xdebug version?

    Also how did you installed Juno? Just clean install or update?

    Try clean install in another folder and copy you workspace settings. Or try without them.

    gaRex
    • 4,144
    • 25
    • 37
    • I'm using the xDebug that came with my wamp installation (in my `"C:\wamp\bin\php\php5.3.8\zend_ext"` directory). I also tried with the newer version of xDebug downloaded using [xDebug Wizard](http://xdebug.org/wizard.php), but this doesn't work, doesn't even stop at the first line of the file while debugging. And I had installed Eclipse Juno after directly downloading from [Eclipse Download Page](http://www.eclipse.org/downloads/). – Tariq M Nasim Dec 31 '12 at 05:14
    • 1
      @HeartBeat try to use clean workspace settings. File / Workspace / Switch other ... May be some settings was incorrect somewhere. – gaRex Dec 31 '12 at 07:40
    • Also try just phpinfo() and check all settings under xdebug -- may be some of them incorrect. See http://stackoverflow.com/questions/3512307/xampp-1-7-3-eclipse-pdt-xdebug-debugging-a-php-web-page-in-eclipse-never-st?rq=1 – gaRex Dec 31 '12 at 07:42
    • Thanks gaRex , I've re-installed WAMP and xDebug, changed the php.ini file accordingly and switched Eclipse Workspace, now it's working. I think the problem was in some of my Eclipse Settings. – Tariq M Nasim Jan 01 '13 at 01:55
    • 1
      I had a random breaking of breakpoints in PDT/xdebug that was fixed by just recreating my workspace. – Chris Jul 29 '13 at 23:29
    3

    For those that accepted solution doesn't work:

    Check xdebug setting: xdebug.remote_enable. Must be ON (Go to phpinfo() to see current setting). Reference here

    Thanassis
    • 857
    • 1
    • 8
    • 25