3

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

Ben
  • 1,377
  • 7
  • 22
  • 40

1 Answers1

1

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
www.kokoti.sk
  • 136
  • 2
  • 3