Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Laravel configuration PhpStorm + Xdebug + Chrome settings Debug Environment     - Ubuntu 14.04 + xRDP + Xfce implement Windows Remote Desktop Connection (Linux)

- CentOS 6.6 install rsync server (Server)

- How the program is executed (Programming)

- Common DDOS attacks (Linux)

- Ubuntu 10.10 install Oracle 10g Installation Guide (Database)

- Linux environment to configure Apache + Django + wsgi (Server)

- Make full use of the Raspberry Pi SD card space (Linux)

- DataGuard add temporary data files bug (Database)

- CentOS 6.5 boot automatically mount the hard drive (Linux)

- OpenSUSE installation on CentOS6 (GUI) (Linux)

- MySQL Data Types (Database)

- MySQL Tutorial: About checkpoint mechanism (Database)

- Installation image conversion tool on your Ubuntu Converseen 0.8.1 (Linux)

- Ubuntu users to install Gnome-Pie 0.6.5 (Linux)

- CentOS6.0 successful installation and configuration OpenCV (Linux)

- Xshell upload files to achieve Windows host Linux (Linux)

- The Linux firewall is configured to use proxy (Linux)

- Boost-- time and date - (1) timer library introduction (Programming)

- Linux find command usage practices (Linux)

- Use in Linux ipmitool tool (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:      
 
- DataGuard a hardware issue warnings found (Database)
- Ubuntu 15.04 Linux install anti-virus software Antiviral 0.2 (Linux)
- For the FreeBSD install Adobe Flash plug-in (Linux)
- Let OpenCV face detection score output codes (Programming)
- Parameters of the extra port MySQL 5.6 (Database)
- Linux Bash share tips for getting started (Linux)
- Configuring LIDS build Linux kernel security intrusion detection system (Linux)
- Linux common network tools: hping Advanced Host Scan (Linux)
- About redis in Replication (Database)
- How to install the latest version of the Eclipse in Ubuntu 14.04 (Linux)
- Secondary exponential smoothing prediction method implemented in Python (Programming)
- Linux network security strategy (Linux)
- The Sublime Text 3 configuration file (Linux)
- iOS custom keyboard emoji expression (Programming)
- MySQL 5.6 master-slave replication configuration (Database)
- Use Elasticsearch + Logstash + Kibana set up centralized log Practice Analysis Platform (Server)
- MySQL IO SSD attempt at optimization (Database)
- The Objects in JavaScript (Programming)
- Ubuntu Gnome and Fedora 22 Gnome desktop, extended to achieve global menu (Linux)
- Android Fragment everything you need to know (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.