Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How should be system configured for use breakpoints of xdebug for phpunit(3.5) tests on netbeans 6.9 (ubuntu 10.04).

Example1 (breakpoint inside Test file): in ExampleTest.php I want to put breakpoint in line 30, when test will run he will stop in line 30 and will able to see variables values etc..

Example2 (breakpoint inside source file): in Example.php I want to put breakpoint in line 60, when test will run he will stop in line 30 and will able to see variables values etc..

Thanks, Yosef

share|improve this question

Configure:

  1. install firefox add-on easy xdebug :: http://www.elime.be/easyxdebug.htm

  2. edit file /etc/php5/apache2/conf.d/xdebug.ini. My content:

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

xdebug.remote_enable=1

xdebug.remote_host=localhost

xdebug.remote_port=9000

  1. [not required] in netbeans, edit project properties projects->youProject->Run Configuration->Advanced->Debug URL:Do Not Open Web Browser

  2. [maybe not required] in netbeans - Tools->Options->PHP->General->Debugging->Debugger port 9000, Session ID: netbeans-xdebug

Run from Firefox:

  1. Ctrl+f5 (Debug Project)

{if firefox}

  1. in firefox, click on green bug with arrow in right bottom corner

{if cli}

  1. add parameter netbeans-xdebug with value 1

{/if}

  1. enjoy
share|improve this answer
    
thanks, but i am asking about phpunit tests that running from command line because that breakpoints not working – Yosef Feb 21 '11 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .