顯示具有 IntelliJ IDEA 標籤的文章。 顯示所有文章
顯示具有 IntelliJ IDEA 標籤的文章。 顯示所有文章

2011年10月21日 星期五

IntelliJ IDea Git repository

设置SSH

github使用SSH链接,需要设置SSH

1.检查SSH key

cd ~/.ssh

2.备份已有的key,(如果有的话)

mkdir key_backup

mv id_rsa* key_backup

3.生成SSH key

$ ssh-keygen -t rsa -C jiang.bo.hit@gmail.com

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/jiangbo/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in yes.

Your public key has been saved in id_rsa.pub.

The key fingerprint is:

fb:c4:b0:e0:47:fd:be:e0:fb:ea:73:ef:a8:29:d5:22 jiang.bo.hit@gmail.com

The key's randomart image is:

+--[ RSA 2048]----+

| |

| |

| |

| . |

| . S .. |

| . oE=o.. |

| . +o+.. |

| ..+.+.. |

| oOB=+o |

+-----------------+

4.将SSH key添加到GitHub

登录到GitHub页面,Account Settings->SSH Public Keys->Add another key

将生成的key(id_rsa.pub文件)内容copy到输入框中,save。



5.测试链接

$ ssh git@github.com

The authenticity of host 'github.com (207.97.227.239)' can't be established.

RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.

Are you sure you want to continue connecting (yes/no)? yes

PTY allocation request failed on channel 0

Hi jiang-bo! You've successfully authenticated, but GitHub does not provide shell access.

Connection to github.com closed.

别担心,这是正常情况。

三、设置个人信息

$ git config --global user.name "Bo Jiang"

$ git config --global user.email "jiang.bo.hit@gmail.com"

Setting of IDEA
Step1: IDEA -> Version Control -> Checkout from Version Control -> Git
Step2: Git Repository URL : git@github.com/xxx.git
Step3: Enter passphrase for the private key
Step4: Create a new project -> Create project from Scratch -> next -> ok

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

2011年9月15日 星期四

IntelliJ IDea PHPUnit Support

After you set up PHPUnit, Web IDE greatly helps you to run your tests. Namely, to quickly create test run configuration:

Right-click the desired target: a directory or a PHP file in the Project view, or a test class/method name in the code editor
Choose Run to start or Create to specify additional parameters
That’s it!


XML configuration file

Advanced settings can be specified through PHPUnit configuration file. All the options specified in Web IDE take precedence over those set in configuration file.



Test groups

A test can be tagged as belonging to one or more groups using the @group annotation as shown below.



The test is run if none of the specified groups is excluded and at least one group is included.



Run/Debug Tests

Before you execute tests, please set up PHP home directory (one that contains PHP executable) in Settings | PHP. Debugging is currently available via XDebug. Specify the same debug port in Settings | PHP as in php.ini file (xdebug.remote_port=).



Test results window

You can easily navigate from tests results tree and stack trace to the corresponding source code location.



When debugging your tests you get all the features, such as watches, expressions evaluation, etc. You can have several debug sessions simultaneously.



All of these features will be available since next EAP.

Test with pleasure!

This entry was posted in Feature and tagged PHP, PhpStorm, PHPUnit, testing. Bookmark the permalink.
page: 2

Web IDE EAP (build 94.5)
Posted on December 9, 2009 by neuro159

There are numerous updates in this build. As usually, most notable are listed below, with details on all (S)FTP, PHPUnit, formatting, javascript and other fixes available in the issue tracker.

Code analyzer will recognize classes, functions and constants referenced by their PHP 5.3 use aliases.
Added PHP Unit debugging and XML config support (included/excluded groups etc.)
Rename refactoring will take care of @param annotations
Undefined variable inspection will recognize pass by reference parameters as appropriate declarations, i.e. in preg_match(.., .. &$matches)
Basic “Add declaration” quickfix for unresolved class methods, properties and constants (Alt-Enter)
Tools|Analyze stacktrace
It looks like we’re done with PHPUnit support – no pending feature requests or bug fixes, please check it out.

Nearest plans include complete support for namespaces to finally close PHP 5.3 support, improved remote synchronization setup and all fixes and neat features that we will be able to stuff-in, just as usual.

Also since IntelliJ IDEA 9.0 is now released we are expecting third party plugins to be updated for 9.0 platform compatibility – that will bring them to WebIDE plugin repository.

Download Web IDE EAP build 94.5 for your platform from project EAP page.

-JetBrains Web IDE Team

reference : http://blog.jetbrains.com/webide/2009/12/phpunit-support/

wibiya widget