[php] How to debug PHP in the terminal

Here I use Netbeans, xdebug to debug the PHP in the terminal of Ubuntu.

 

1. you have to install the xdebug extension, pls refer to: [Ubuntu] Easy PHP Debugging in Ubuntu (using Xdebug and Vim)

2. Edit your profile and add this to your envirement.

vim ~/.profile

add these code to it.

export XDEBUG_CONFIG="idekey=netbeans-xdebug"

reload the profile

source ~/.profile

 

Then you can debug the code in Netbeans!

 

 

Have fun with Ubuntu!

 

你可能感兴趣的:(Terminal)