Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.