Debugging with PhpStorm locally


Question: 

Kind of a noob question. I'm uploading to a remote server. I've been advised to debug locally (versus remotely). How am I to pull up my files in a browser, then use the debugging tools in PhpStorm? As it stands, my remote host (in PhpStorm) is configured. I've done my own research but can't seem to find a clear answer. Thanks!




1 Answer: 

There is a "zero-configuration" debugging as described in docs. Also if in trouble try this xdebug settings:

; path to your php_xdebug extension file
; download from https://xdebug.org/wizard.php
zend_extension="c:\xampp-php7\php\ext\php_xdebug-2.4.0-7.0-vc14.dll"
; disables profiler globally 
xdebug.profiler_enable = 0
; allows enabling it selectively with request parameter "XDEBUG_PROFILE"
xdebug.profiler_enable_trigger = 1
; directory to output profiler files to
xdebug.profiler_output_dir = "C:\xampp-php7\tmp"
; profiler file name (with request uri and timestamp)
xdebug.profiler_output_name = "%R-%t.cgout"
; enables debugger
xdebug.remote_enable = 1
; selects the dbgp protocol
xdebug.remote_handler = "dbgp"
; host where debug client is running
xdebug.remote_host = "localhost"
; debugger port
xdebug.remote_port = 9000
; disables xdebug traces in error messages - use https://tracy.nette.org/ instead
xdebug.default_enable = "Off"
; makes sure that the process does not freeze when there is no debug client
xdebug.remote_autostart = 0

I created a gist for easier sharing

 

More Articles


Android: pin TabLayout to top of Scrollview

I was looking at the twitter app on my phone.You can see that when a user scrolls up, the tabLayout actually just pins itself onto the bottom of the toolbar nicely and does not move at all.I thought maybe they did it by just putting all of the top part of the app (the profile picture, the profile wa

WPF Frame Source Refreshing the Loaded Page

I've come across a strange scenario where a frame refuses to refresh its content.I can kinda understand what's happening but the solution is not coming to me.I have a page that has a frame (Frame1) and several buttons. When I click on a button a page is loaded into the frame. This works perfectly in

android - Horizontal and Vertical linear layout inside a scroll view

I am trying to get a combination of Views established. They must constantly have a Button and Edittext box at the top horizontally next to each other and below that a vertical list of Textviews. The vertical list should be enclosed in a ScrollView to allow the user to scroll down through the TextVie


WPF c# window navigation

i got 2 window , i want to navigate from one another but i when i debug it , it shows that nav is null , why is that so? Does it suppose to be null? because i used the same way to navigate in the past and it work and i try it now , it doesn't work. But if i put nav == null , it says nav.Navigate(n

jquery - CSS for toolbar with UI Slider centered between left and right buttons

I'm attempting to create a 100% width toolbar. This toolbar needs to have a variable number of buttons aligned to the left side, as well as a variable number of buttons aligned to the right. That's the easy part.But now I want to put a jQuery UI slider in the center that takes up the full remaining

xamarin.forms - How to add background image to grid layout in xamarin forms?

I have four rows and two columns.I need to display the background image to full grid.Please provide me solution.I had referred this creating background image in content page link:Xamarin Forms - how to add background image to a content page.But how to set background image to grid layout.


c# - Custom Control, bind to code behind

Having trouble binding to the data in my code behind for my custom control. Obviously I have got to use the Generic.xaml to style my control, and I want to bind to the data in my control UserProfile.cs. This is the code behind:using System;using System.Windows;using System.Windows.Controls;namespace

PhpStorm: automatically rename file on remote host when renaming it locally

Is there any configuration in PhpStorm that automatically renames file on remote host when you rename it locally and reverse?

xamarin.forms - Margin to a Image in Xamarin Forms

I have an image on my Xamarin.Forms. I want to add some margin from Top. Form.XAML:-<ContentPage.Content> <Grid> <Image x:Name="image" /> </Grid></ContentPage.Content>"Form.XAML.cs:- image.Source = ImageSource.FromFile (Height > Width ? "portrait.jpg"

c# - ASP.NET Chart Control and Databinding to multiple Series

I am working with the ASP.NET chart control and I am using the following code to databind data to the chart control. The chart has three series on it: Series1, Series2 and Series3. The problem that I am having with the code below is that it only seems to bind to the first series so that when the ch