Local Xdebug Debug Build Laravel+homestead+phpstorm

Source: Internet
Author: User

1. Install and configure Xdebug in Homestead virtual box

First run vagrant up and Vagrant Ssh,ssh remote to homestead in the terminal, then copy the following code into a shell file and execute it.

#!bash/BINCD~#download and UncompresswgetHttps//xdebug.org/files/xdebug-2.4.0.tgzTarXvzf xdebug-2.4.0. Tgz#compile and Make InstallCD Xdebug-2.4.0Phpize7.0./configure--enable-Xdebug Makesudo  Make Installmkdir-p/usr/local/php/Xdebugsudo CP~/xdebug-2.4.0/modules/xdebug.so/usr/local/php/xdebug/xdebug.soCat>>xdebug.ini<<eofzend_extension="/usr/local/php/xdebug/xdebug.so"xdebug.remote_enable=1Xdebug.remote_connect_back=1Xdebug.remote_port=9000Xdebug.max_nesting_level= -EOFsudo CPxdebug.ini/etc/php/mods-available/Xdebug.inisudo LN-snf/etc/php/mods-available/xdebug.ini/etc/php/7.0/cli/conf.d/ --Xdebug.inisudo LN-snf/etc/php/mods-available/xdebug.ini/etc/php/7.0/fpm/conf.d/ --xdebug.iniservice PHP7.0-fpm Restartcd~sudo RM-R xdebug-2.4.0sudo RMxdebug-2.4.0. tgz

2. Install the Xdebug plugin according to the browser

Xdebug Helper for Chrome or jetbrains IDE support

Xdebug Toggler for Safari

3.PHPStorm Configuration Xdebug

3.1 Run->edit configurations on navigation ... Enter the following interface

Save settings based on settings.

Run debug, set breakpoints, and then run Run->debug, such as:

Run successfully ko!

Resources:

Https://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide

Local Xdebug Debug Build Laravel+homestead+phpstorm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.