[xdebug-general] Re: Is xDebug available for PHP 7.1.9 ?

From: Spencer Williams <enderandpeter[@]yahoo.com>
Date: Wed, 1 Nov 2017 07:44:07 -0600

On 11/1/2017 3:31 AM, castor_troy[@]tut.by wrote:
> Hi Spencer Williams,
> Sorry for the late response, cause I had to continue developing
> without xDebug.
> I can't use it yet.
> I have run "Validate Debugger Configuration on Web Server" in my phpStorm,
> I have used the local URL of the project here (in 'Url to validation
> script' field).
> But I have got this error
> http://dl3.joxi.net/drive/2017/11/01/0024/2304/1575168/68/d8b6e845f6.jpg
> Can you help me -- What does it means 'validation script'?
> Is it some php script inside my project?
> If yes-- What it should contain?
> ===================================
> I have tried also to set up 'Remote Web Server Configuration'
> Checking SFTP connection finished with success as you can see on this
> screenshot
> http://dl4.joxi.net/drive/2017/11/01/0024/2304/1575168/68/0984d0f172.jpg
> Then I have updated the Route path -- Now it uses the path to the
> route of the project:
> http://dl4.joxi.net/drive/2017/11/01/0024/2304/1575168/68/d3b8a1d2dd.jpg
> I have also added mapping
> http://dl4.joxi.net/drive/2017/11/01/0024/2304/1575168/68/62b9512720.jpg
> But with no success
> http://dl4.joxi.net/drive/2017/11/01/0024/2304/1575168/68/621deaccdb.jpg
> Can you help me? Can you say what I am doing wrong ?
> Best regards.
>
>
> 21.09.2017, 16:39, "Spencer Williams" <enderandpeter[@]yahoo.com>:
>> On 9/21/2017 3:28 AM, castor_troy[@]tut.by <mailto:castor_troy[@]tut.by>
>> wrote:
>>> Hi,
>>> I run these commands that you send to me.
>>> vagrant[@]vagrant:~/sites$ php --version
>>> PHP 7.1.9-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Sep 2 2017
>>> 06:17:11) ( NTS )
>>> Copyright (c) 1997-2017 The PHP Group
>>> Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
>>>     with Zend OPcache v7.1.9-1+ubuntu14.04.1+deb.sury.org+1,
>>> Copyright (c) 1999-2017, by Zend Technologies
>>>     with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
>>> ======================================================================================
>>> vagrant[@]vagrant:~/sites$ php -i | grep xdebug
>>> /etc/php/7.1/cli/conf.d/20-xdebug.ini,
>>> xdebug
>>> xdebug support => enabled
>>> xdebug.auto_trace => Off => Off
>>> xdebug.cli_color => 0 => 0
>>> xdebug.collect_assignments => Off => Off
>>> xdebug.collect_includes => On => On
>>> xdebug.collect_params => 0 => 0
>>> xdebug.collect_return => Off => Off
>>> xdebug.collect_vars => Off => Off
>>> xdebug.coverage_enable => On => On
>>> xdebug.default_enable => On => On
>>> xdebug.dump.COOKIE => no value => no value
>>> xdebug.dump.ENV => no value => no value
>>> xdebug.dump.FILES => no value => no value
>>> xdebug.dump.GET => no value => no value
>>> xdebug.dump.POST => no value => no value
>>> xdebug.dump.REQUEST => no value => no value
>>> xdebug.dump.SERVER => no value => no value
>>> xdebug.dump.SESSION => no value => no value
>>> xdebug.dump_globals => On => On
>>> xdebug.dump_once => On => On
>>> xdebug.dump_undefined => Off => Off
>>> xdebug.extended_info => On => On
>>> xdebug.file_link_format => no value => no value
>>> xdebug.force_display_errors => Off => Off
>>> xdebug.force_error_reporting => 0 => 0
>>> xdebug.halt_level => 0 => 0
>>> xdebug.idekey => XDEBUG_SESSION_START => XDEBUG_SESSION_START
>>> xdebug.max_nesting_level => 256 => 256
>>> xdebug.max_stack_frames => -1 => -1
>>> xdebug.overload_var_dump => 2 => 2
>>> xdebug.profiler_aggregate => Off => Off
>>> xdebug.profiler_append => Off => Off
>>> xdebug.profiler_enable => Off => Off
>>> xdebug.profiler_enable_trigger => Off => Off
>>> xdebug.profiler_enable_trigger_value => no value => no value
>>> xdebug.profiler_output_dir => /tmp => /tmp
>>> xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
>>> xdebug.remote_addr_header => no value => no value
>>> xdebug.remote_autostart => On => On
>>> xdebug.remote_connect_back => On => On
>>> xdebug.remote_cookie_expire_time => 3600 => 3600
>>> xdebug.remote_enable => On => On
>>> xdebug.remote_handler => dbgp => dbgp
>>> xdebug.remote_host => localhost => localhost
>>> xdebug.remote_log => /home/vagrant/sites/xdebug.log =>
>>> /home/vagrant/sites/xdebug.log
>>> xdebug.remote_mode => req => req
>>> xdebug.remote_port => 9008 => 9008
>>> xdebug.scream => Off => Off
>>> xdebug.show_error_trace => Off => Off
>>> xdebug.show_exception_trace => Off => Off
>>> xdebug.show_local_vars => Off => Off
>>> xdebug.show_mem_delta => Off => Off
>>> xdebug.trace_enable_trigger => Off => Off
>>> xdebug.trace_enable_trigger_value => no value => no value
>>> xdebug.trace_format => 0 => 0
>>> xdebug.trace_options => 0 => 0
>>> xdebug.trace_output_dir => /tmp => /tmp
>>> xdebug.trace_output_name => trace.%c => trace.%c
>>> xdebug.var_display_max_children => 128 => 128
>>> xdebug.var_display_max_data => 512 => 512
>>> xdebug.var_display_max_depth => 3 => 3
>>> Can you give me some advice?
>>> 20.09.2017, 16:55, "Spencer Williams" <enderandpeter[@]yahoo.com>
>>> <mailto:enderandpeter[@]yahoo.com>:
>>>> On 9/20/2017 1:23 AM, castor_troy[@]tut.by
>>>> <mailto:castor_troy[@]tut.by> wrote:
>>>>> Hello,
>>>>>
>>>>> 1)
>>>>>
>>>>> I have the project which is installed under vagrant machine.
>>>>> I have Ubuntu 14.04 on this vagrant installation.
>>>>> My project uses PHP 7.1.9
>>>>> I have installed xdebug running
>>>>>
>>>>> sudo apt-get install php-xdebug
>>>>>
>>>>> Then I have added such settings into /etc/php/7.1/mods-available/xdebug.ini ( I am using nginx, that is why my PHP is running using FPM)
>>>>>
>>>>>
>>>>> zend_extension=xdebug.so
>>>>>
>>>>> xdebug.remote_enable = 1
>>>>> xdebug.remote_port = 9008
>>>>> xdebug.remote_autostart = 1
>>>>> xdebug.remote_handler = dbgp
>>>>> xdebug.idekey = XDEBUG_SESSION_START
>>>>> xdebug.remote_connect_back = On
>>>>> xdebug.remote_mode = req
>>>>> xdebug.remote_log = "/home/vagrant/sites/xdebug.log"
>>>>> xdebug.default_enable=1
>>>>> xdebug.remote_connect_back=1
>>>>>
>>>>>
>>>>>
>>>>> 2) I am using phpStorm, and I have set xdebug port as: 9008 (like in my xdebug.ini)
>>>>>
>>>>> http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/ba849755c8.jpg
>>>>>
>>>>> 3) I have made all neccesary settings in my phpStorm
>>>>>
>>>>> http://dl3.joxi.net/drive/2017/09/20/0024/2304/1575168/68/c676d73d43.jpg
>>>>>
>>>>> 4) I have added the path to php (inside vagrant installation ) /usr/bin/php7.1
>>>>>
>>>>> http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/b14e60979a.jpg
>>>>>
>>>>>
>>>>> 5) Then I have put the breakpoint on the first line of my php script
>>>>>
>>>>> http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/4f578c317d.jpg
>>>>>
>>>>> 6) Then I press 'Debug' button in phpStorm ( look prev screenshot )
>>>>>
>>>>> 7) In my Chrome the page has been started to load
>>>>>
>>>>> http://dl3.joxi.net/drive/2017/09/20/0024/2304/1575168/68/cb8a8f686e.jpg
>>>>>
>>>>> 8) I see that server is waiting, and that is why Chrome does not show anything.
>>>>> It looks like xdebug is working, BUT phpStorm does not stop on my breakpoint.
>>>>>
>>>>> This is the problem which I can't solve yet.
>>>>>
>>>>>
>>>>> 9) If I press 'Stop' button in phpStorm and reload the page which I try to debug --
>>>>> It loads quickly without any delays:
>>>>>
>>>>> http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/93a4c48bc0.jpg
>>>>>
>>>>> Pls, help me or give me some advice, how can I fix it?
>>>>>
>>>>> Thank You.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 19.09.2017, 19:52, "Derick Rethans"<derick[@]xdebug.org> <mailto:derick[@]xdebug.org>:
>>>>>> On Tue, 19 Sep 2017,castor_troy[@]tut.by <mailto:castor_troy[@]tut.by> wrote:
>>>>>>
>>>>>>>  Can You help me?
>>>>>>>  I want to know if xDebug is available for PHP 7.1.9 ?
>>>>>> It's certainly available.
>>>>>>
>>>>>>>  I have tried to use it under vagrant environment.
>>>>>>>  I have Ubuntu 14.04.1 and PHP7.1.9 on it.
>>>>>>>
>>>>>>>  Can you help me to Identify if the problem is with my PHP version?
>>>>>> I can't help, as you have not mentioned what you have tried, what
>>>>>> happened, and which errors you received.
>>>>>>
>>>>>> In general, just following this, should work:
>>>>>> https://xdebug.org/wizard.php
>>>>>>
>>>>>> cheers,
>>>>>> Derick
>>>>>> --
>>>>>> Like Xdebug? Consider a donation:https://xdebug.org/donate.php
>>>>>> Xdebug |https://xdebug.org <https://xdebug.org/> |xdebug-general@lists.xdebug.org
>>>>>> <mailto:xdebug-general[@]lists.xdebug.org>
>>>>>> twitter: @derickr and @xdebug
>>>>>
>>>>
>>>> Thanks a lot for all the info and the very useful screenshots.
>>>> Okay, it looks like you have things setup right. I'd like to
>>>> confirm that when you say php --version, it reports the presence of
>>>> Xdebug. Also, do a php -i | grep xdebug to make sure it's picking
>>>> up on the config.
>>>>
>>>> It's great you're using PHPStorm because they have a nice feature
>>>> for helping you confirm very positively that everything is going to
>>>> work. Take a look at my guide at
>>>> https://aninternetpresence.net/dev-guides/amp/xdebug/. Make sure
>>>> you go to /Run -> Web Server Debug Validation/ and confirm
>>>> everything is indeed filled out so that it reports that there are
>>>> no issues. You should see a dialog box verifying all your settings:
>>>> https://aninternetpresence.net/wp-content/uploads/2017/02/PHPStorm_WebsiteValidate.png
>>>>
>>>> If you are seeing verification of that nature, then I hope we can
>>>> narrow the issue down to the IDE. Otherwise, something still may
>>>> not be in order on the server.
>>>>
>>>> --
>>>>
>>>> -Spencer <http://aninternetpresence.net/>
>>>>
>>>> -----------------
>>>> "What a lark! What a plunge!"
>>>> - Mrs. Dalloway
>>>> <http://ebooks.adelaide.edu.au/w/woolf/virginia/w91md/>, Virginia Woolf
>>
>> Ah, that all looks good. Well, in PHPStorm, when you go to /Run ->
>> Web Server Debug Validation//, /what does//it report/?/ You need to
>> have it tell you that everything is in working order like that
>> screenshot and I have a feeling it might still be missing something.
>> I think you'd want to do the "Remote Web Server" setup. Even though
>> it looks like things are setup right in those other screenshots you
>> shared, you'll want to get to that Validate window to find out if
>> PHPStorm really is satisfied with everything.
>>
>> --
>>
>> -Spencer <http://aninternetpresence.net/>
>>
>> -----------------
>> "What a lark! What a plunge!"
>> - Mrs. Dalloway
>> <http://ebooks.adelaide.edu.au/w/woolf/virginia/w91md/>, Virginia Woolf

Hey good sir. Ah, it looks like you are quite close!

Okay, so if your project is in Vagrant, you can go ahead and choose
"Local Web Server or Shared Folder". Make absolutely sure that "Path to
create validation script" is the document root of your site and that
"Url to validation script" is a URL to the root of your site. The
"validation script" is created by PHPStorm at the system path you give
it so that it can be retrieved under the URL you entered. It basically
creates a file that looks at your PHP and Xdebug settings on the web
server to confirm that everything is in order.

So, when it says "Connection timed out", that strongly makes me suspect
that the URL you gave it was not actually reachable. If you set this
part up correctly, you will not have to bother with path mappings as it
should figure all that out. So, go ahead and focus on getting it to work
with the "Local Web Server" option by making absolutely sure the first
box has the path to the document root, where the index.php is, and the
second box is the site root and that you can definitely connect to the
site right now. I personally was having problems setting up Xdebug in
PHPStorm recently at this very step, and my mistake was that I thought I
gave it the path to the document root but I was mistaken about the
correct folder, but once I fixed it, PHPStorm created the validation
script, so I'm rooting for the same kind of success in your case.

-- 
-Spencer <http://aninternetpresence.net>
-----------------
"What a lark! What a plunge!"
- Mrs. Dalloway <http://ebooks.adelaide.edu.au/w/woolf/virginia/w91md/>, 
Virginia Woolf
Received on Wed Nov 01 2017 - 13:44:12 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST