2011年9月21日 星期三

Mac OSX intelliJ idea 10.5.2 XDebug setting

Install XDebug
Download [xdebug.so] from http://code.activestate.com/komodo/remotedebugging/
Click [PHP Remote Debugging Client] > [Mac OS X (universal)]
$ copy xdebug.so /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so

edit php.ini
$vi /path/to/php.ini

[xdebug]
zend_extension = /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /tmp/xdebug
xdebug.profiler_enable_trigger =1
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000


Set the path of php bin
[Preferences] > PHP
PHP Home :
/Applications/XAMPP/xamppfiles/bin
Debugger : Xdebug

Set the Server information
Name : MySiteName
Host : 127.0.0.1
Port : 3171
Debugger : Xdebug

Senerio 1: Javascript Debug Settings
Step1: [Run] > [Debug Configurations] > Defaults > JavaScript Debug(Mouse right click) > Add New Configuration
Step2:
Switch to [Remote] tab
-Name : JS-IndexPHP (Example: If I want to link to index.php)
-URL to open : http://127.0.0.1:3171/index.php (Apache webserver url link to index.php)
-Browser : Chrome
Step3: Set path of Chrome [/Applications/Google Chrome.app]
[Preferences] > Web Browsers > Chrome
check [Active]


Senerio 1: PHPUnit Settings(AllTests.php testsuite)
Step1: [Run] > [Debug Configurations] > Defaults > PHPUnit > Add New Configuration
Step2:
Switch to [Configuration] tab
-Test : All in File
-Test file : /path/to/build/testCase/phpunit/AllTests.php

Senerio 1: PHPUnit Settings(CustomTest.php testclass)
Step1: [Run] > [Debug Configurations] > Defaults > PHPUnit > Add New Configuration
Step2:
Switch to [Configuration] tab
-Test : Class or Suite
-Test file : /path/to/build/testCase/phpunit/inc/class/widgetPool/class/db/WidgetPoolDB.php
- Test class : WidgetPoolDBTest

沒有留言:

wibiya widget