php application can debug locally

ex. stop at breakpoint

INSTALL PHPSTORM

php storm is nice IDE for php debug.

you can access and download in jetbrains website (students are free).

install and launch php storm.

INSTALL LAMPSERVER

if you are not installed LAMP environment and using Ubuntu, you can install it by following command.

INSTALL XDEBUG

php debug need xdebug utility

SETUP YOUR PHP PROJECT

launch php storm and create or open your php project.

click [File]>[Settings] on menu bar.

select [Languages & Frameworks]>[PHP]>[Servers] on left pane.

click [+] and input “localhost” and port number that your server listens.

select “Xdebug” at Debugger.

click [OK] button.

click [Run]>[Edit Configurations] on menu bar.

click [+] button and select “PHP Remote Debug”

select your server on “servers” that you created at previous section.

ide key is anything ok

click [ok] button.

click [Run]>[Start Listening for php debug connections] on menu bar.

ACCESS AND DEBUG YOUR CODE

setup are completed above.

click [Run]>[Debug].

access “localhost” using your browser.

program are stopped at breakpoint position 🙂