Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Laravel configuration PhpStorm + Xdebug + Chrome settings Debug Environment     - Write perfect printf (Programming)

- CentOS6 install Redis (Database)

- Linux remote wake the computer original code [C] (Linux)

- IPTABLES configuration steps under Linux (Linux)

- To modify the existing user ID and comments GPG key (Linux)

- C ++ sequence containers basics summary (Programming)

- Linux Network Programming - raw socket Example: sending a UDP packet (Programming)

- How do I upgrade to Ubuntu 15.04 (Beta) (Linux)

- CentOS cross compiler core Raspberry Pi 2 (Linux)

- RT-11SJ run at ambient PDP-11 MACRO-11 assembly (Programming)

- Linux account related documents Interpretation (Linux)

- Installation and use GAMIT / GLOBK Software (Linux)

- Guide: Trickle restrict application bandwidth usage (Linux)

- Linux development management utility command (Linux)

- With screenfetch linux logo and basic hardware information display with cool Linux logo (Linux)

- How to manage Vim plugin (Linux)

- Set multiple IP addresses for a single network card on Ubuntu 15.10 (Linux)

- Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang (Linux)

- Linux operating system security management skills (Linux)

- Linux POST fstab configuration file read-only variable can not be modified problem (Linux)

 
         
  Laravel configuration PhpStorm + Xdebug + Chrome settings Debug Environment
     
  Add Date : 2018-11-21      
         
         
         
  Brief introduction

Configure Laravel in PhpStorm the breakpoint debugging, there are two ways, the first is the most common, direct configuration and installation of a chrom look phpstorm plug can be, but this approach has some drawbacks, is the very API debugging easy, such as Ajax or client requests:
http://laravelista.com/debugging-a-laravel-web-application-with-phpstorm-on-homestead/
http://www.sitepoint.com/install-xdebug-phpstorm-vagrant/
 
There is also a more general way, is both a genius to know through phpstorm interceptor function, can intercept any PHP request, also need to install a plug-in chrome:
https://phphub.org/topics/553, summed up very well, but only after I found this article summarizes finished, otherwise I do not write
https://laracasts.com/forum/?p=1648-phpstorm-homestead-xdebug/0, to explain in great detail in this article, it is praise
https://www.youtube.com/watch?v=LUTolQw8K9A
http://blog.elenakolevska.com/debugging-laravel-on-homestead/, this article is talking about can be, but on the inside the port settings and the path mapped speak flawed aspect, I wasted most of the day time to correct this problem
 
Configuring php.ini

After logging vagrant, use "sudo vim /etc/php5/fpm/conf.d/20-xdebug.ini" command to edit the configuration file xdebug, I basically do not have to make changes to this file, the configuration file as follows

Configuration PhpStorm

 
First, you can refer to http://blog.elenakolevska.com/debugging-laravel-on-homestead/ in PhpStrom to configure vagrant options. Select Preferences -> Languages & Frameworks -> PHP.

Click on the arrow pointing to the button, and then click on the "+" button, select "Remote"

Select Vagrant and set the root directory vagrantfile, that folder is selected HomeStead

After configuration is as follows:

You can click on the "Test connection" to test the configuration is working.
 
Configure Chrome

First we need to install Xdebug helper browser plug-ins to add parameters in the request, like: XDEBUG_SESSION_START = session_name.
Chrome: https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc;
Firefox: https://addons.mozilla.org/en-US/firefox/addon/the-easiest-xdebug/
Safari: https://github.com/benmatselby/xdebug-toggler
 
My development environment is Chrome at the mac. After installation, you can Xdebug helper some settings, for example, only for a specific domain name to start plug, which set white list. To access the plug-in setup options, first open the chrome plugin management page, click Xdebug helper options.

Under Options, set the IDE key to PhpStorm, and homestead.app added to the Domain filter, so that you will only be displayed for the domain debug plug.

 
After the plug-in installation, enter the white list domain names in a browser, I have here is homestead.app, you can see the plug-in icon in the address bar, click on the icon, select Start Debug.

Debugging

 
After the setup is complete environment, we want to begin with PHP debug. Click Run -> Start Listening for PHP Debug Connections,

 
Then enter the chrome before the domain name. That homestead.app, then PhpStorm will pop up a dialog box, select the "Accept" to.

Then choose Preferences -> Languages & Frameworks -> PHP -> Servers

 
Then we need to modify the item corresponding to the outer path mapping, otherwise it can only be index.php debug, and break other files will not work, http: //laravel.io/forum/08-31 -2014-homestead-phpstorm-xdebug-only-works-with-indexphp

 
After everything is set up, you can enjoy for a debug with PHP

 
 
POST request

When we use POSTMan debug post request, add the url query: XDEBUG_SESSION_START = PHPSTORM can, at this time the breakpoint can be intercepted.
     
         
         
         
  More:      
 
- MySQL rollback insert statement causes ibd file grows double (Database)
- How to use nmap command in Linux (Linux)
- Use Vagrant up a local development environment tutorials (Server)
- BGP routers want to play it by CentOS (Linux)
- To_explore Linux system boot process (Linux)
- JBPM6 Tutorial - taught you how to install JBPM (Linux)
- Git use and interpretation of common commands (Linux)
- CentOS 6.x systems installation + NIC driver installation (Realtek PCIe GBE Family Controller for Linux) (Linux)
- Oracle 10g in the unique and index problems (Database)
- Linux vi command list (Linux)
- Oracle table Access Control (Database)
- Java regular expression syntax (Programming)
- To install the Contiki development toolchain on Ubuntu (Linux)
- Linux network monitoring tools ntopng installation (Linux)
- Linux kernel VLAN study notes (Programming)
- Killall five options you might not know (Linux)
- Github Getting Started Basic Course (Linux)
- To build Spring RestTemplate use HttpClient4 (Programming)
- DVD production using CentOS installation source within the company Yum (Linux)
- Smooth upgrade to OpenSSH 6.1 Procedure (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.